public function __construct(string $directory) { $this->directory = $directory; $this->filesystem = new Filesystem(); $this->basePath = $this->filesystem->normalizePath(realpath(getcwd())); }