Skip to content

Commit 652cfca

Browse files
committed
Fixing PHPStan and running it in v8 only
1 parent 5f9e1c1 commit 652cfca

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ jobs:
5555

5656
- name: "Run static code analysis with phpstan/phpstan"
5757
run: "composer phpstan"
58+
if: ${{ matrix.php-version == '8.0' }}
5859

5960
- name: "Run coding standard checks with squizlabs/php_codesniffer"
6061
run: "composer cs-check"
62+
if: ${{ matrix.php-version == '8.0' }}
6163

6264
- name: "Archive code coverage results"
6365
uses: "actions/upload-artifact@v1"

src/AnnotationReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ private function getClassAnnotation(ReflectionClass $refClass, string $annotatio
270270
$attribute = $refClass->getAttributes($annotationClass)[0] ?? null;
271271
if ($attribute) {
272272
$instance = $attribute->newInstance();
273-
assert($instance instanceof T);
273+
assert($instance instanceof $annotationClass);
274274
return $instance;
275275
}
276276
}

0 commit comments

Comments
 (0)