Skip to content

Commit

Permalink
Merge pull request #31 from tcfoo/patch-1
Browse files Browse the repository at this point in the history
Update PathResolver.php
  • Loading branch information
pavelmaksimov25 authored Jul 25, 2023
2 parents cecbff0 + 92b16a0 commit bc840fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)%"
Expand Down Expand Up @@ -147,4 +147,3 @@ services:
- '%project_id%'
- '%repository_name%'
- '%organization_name%'

10 changes: 5 additions & 5 deletions src/Resolver/PathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
class PathResolver implements PathResolverInterface
{
/**
* @var string|null
* @var string
*/
protected ?string $projectDirEnv;
protected string $projectDirEnv;

/**
* @var \Symfony\Component\Filesystem\Filesystem
*/
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;
Expand Down Expand Up @@ -77,6 +77,6 @@ public function createPath(string $relativePath = ''): string
*/
public function getProjectDir(): string
{
return $this->projectDirEnv ?? (string)getcwd();
return $this->projectDirEnv ?: (string)getcwd();
}
}

0 comments on commit bc840fc

Please sign in to comment.