Skip to content

Commit 3222232

Browse files
committed
Use PHPStan 2.0
1 parent 2b3882a commit 3222232

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"require-dev": {
3737
"composer/composer": ">=2.4",
38-
"phpstan/phpstan": "^1.9",
38+
"phpstan/phpstan": "^2.0",
3939
"phpunit/phpunit": "^9.5"
4040
},
4141
"extra": {

src/ClassAttributeCollector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public function collectAttributes(string $class): array
6565
}
6666

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

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

@@ -126,6 +125,6 @@ private static function isAttributeIgnored(ReflectionAttribute $attribute): bool
126125
\ReturnTypeWillChange::class => true,
127126
];
128127

129-
return isset($ignored[$attribute->getName()]);
128+
return isset($ignored[$attribute->getName()]); // @phpstan-ignore offsetAccess.nonOffsetAccessible
130129
}
131130
}

src/Datastore/FileDatastore.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public function __construct(
3131
private string $dir,
3232
private IOInterface $io,
3333
) {
34-
assert($dir !== '');
35-
3634
if (!is_dir($dir)) {
3735
mkdir($dir);
3836
}

0 commit comments

Comments
 (0)