Skip to content

Commit

Permalink
Suppress UnnecessaryVarAnnotation for needed @var
Browse files Browse the repository at this point in the history
Symfony 5 does not properly annotate yet
  • Loading branch information
discordier committed Apr 24, 2024
1 parent 9c83889 commit 090634b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Configuration/Loader/AbstractFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ protected function glob(
return;
}

/**
* @psalm-suppress UnnecessaryVarAnnotation - Needed for symfony 5 annotations.
* @var string $prefix
*/
$resource = new GlobResource($prefix, $pattern, $recursive, $forExclusion, $excluded);

foreach ($resource->getIterator() as $filename => $fileInfo) {
Expand Down
4 changes: 4 additions & 0 deletions src/Configuration/Loader/YamlLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function load($resource, $type = null): void
if (!is_string($resource)) {
throw new InvalidArgumentException('Resource is not a string');
}
/**
* @psalm-suppress UnnecessaryVarAnnotation - Needed for symfony 5 annotations.
* @var string $path
*/
$path = $this->locator->locate($resource);
$content = $this->loadFile($path);

Expand Down

0 comments on commit 090634b

Please sign in to comment.