Skip to content

Commit

Permalink
[PHPStan] Skip PHPStan error message on RectorConfigsResolver check r…
Browse files Browse the repository at this point in the history
…ealpath (#1126)
  • Loading branch information
samsonasik committed Nov 1, 2021
1 parent 539f70a commit 2b09156
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -526,3 +526,7 @@ parameters:
-
path: packages/Caching/ValueObject/Storage/FileCacheStorage.php
message: '#Instead of "Nette\\Utils\\FileSystem" class/interface use "Symplify\\SmartFileSystem\\SmartFileSystem"#'

-
path: src/Bootstrap/RectorConfigsResolver.php
message: '#Method Rector\\Core\\Bootstrap\\RectorConfigsResolver\:\:resolveFromInput\(\) should return string\|null but returns string\|false#'
4 changes: 1 addition & 3 deletions src/Bootstrap/RectorConfigsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ private function resolveFromInput(ArgvInput $argvInput): ?string
throw new FileNotFoundException($message);
}

/** @var string $configFile */
$configFile = realpath($configFile);
return $configFile;
return realpath($configFile);
}

private function resolveFromInputWithFallback(ArgvInput $argvInput, string $fallbackFile): ?string
Expand Down

0 comments on commit 2b09156

Please sign in to comment.