Skip to content

Commit

Permalink
Use PHPStan 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Nov 21, 2024
1 parent 4e411c9 commit 5c46fd9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"require-dev": {
"composer/composer": ">=2.4",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^9.5"
},
"extra": {
Expand Down
3 changes: 1 addition & 2 deletions src/ClassAttributeCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public function collectAttributes(string $class): array
}

$method = $methodReflection->name;
assert($method !== '');

$this->io->debug("Found attribute {$attribute->getName()} on $class::$method");

Expand Down Expand Up @@ -126,6 +125,6 @@ private static function isAttributeIgnored(ReflectionAttribute $attribute): bool
InheritsAttributes::class => true,
];

return isset($ignored[$attribute->getName()]);
return isset($ignored[$attribute->getName()]); // @phpstan-ignore offsetAccess.nonOffsetAccessible
}
}
2 changes: 0 additions & 2 deletions src/Datastore/FileDatastore.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public function __construct(
private string $dir,
private IOInterface $io,
) {
assert($dir !== '');

if (!is_dir($dir)) {
mkdir($dir);
}
Expand Down

0 comments on commit 5c46fd9

Please sign in to comment.