diff --git a/config/services.yaml b/config/services.yaml index 6e08fe3..4984b46 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -3,7 +3,7 @@ imports: - {resource: reports.yaml} parameters: - env(EVALUATOR_PROJECT_DIR): ~ + env(EVALUATOR_PROJECT_DIR): '' env(GITHUB_AUTH): ~ report_file: 'reports/evaluator.*' current_php_version: "%env(default:current_server_php_version:string:PROJECT_PHP_VERSION)%" @@ -147,4 +147,3 @@ services: - '%project_id%' - '%repository_name%' - '%organization_name%' - diff --git a/src/Resolver/PathResolver.php b/src/Resolver/PathResolver.php index 7f99f7e..e2f004b 100644 --- a/src/Resolver/PathResolver.php +++ b/src/Resolver/PathResolver.php @@ -15,9 +15,9 @@ class PathResolver implements PathResolverInterface { /** - * @var string|null + * @var string */ - protected ?string $projectDirEnv; + protected string $projectDirEnv; /** * @var \Symfony\Component\Filesystem\Filesystem @@ -25,10 +25,10 @@ class PathResolver implements PathResolverInterface protected Filesystem $filesystem; /** - * @param string|null $projectDirEnv + * @param string $projectDirEnv * @param \Symfony\Component\Filesystem\Filesystem $filesystem */ - public function __construct(?string $projectDirEnv, Filesystem $filesystem) + public function __construct(string $projectDirEnv, Filesystem $filesystem) { $this->projectDirEnv = $projectDirEnv; $this->filesystem = $filesystem; @@ -77,6 +77,6 @@ public function createPath(string $relativePath = ''): string */ public function getProjectDir(): string { - return $this->projectDirEnv ?? (string)getcwd(); + return $this->projectDirEnv ?: (string)getcwd(); } }