Skip to content

Commit 6bf0fc2

Browse files
authored
test(phpstan): Ignore a false unreachable statement error (#1261)
1 parent fbd4291 commit 6bf0fc2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
webonyx/graphql-php:^14.8 \
9090
drupal/typed_data:^1.0 \
9191
drupal/redirect:^1.6 \
92-
phpstan/phpstan:^1.2.0 \
92+
phpstan/phpstan:^1.4.6 \
9393
mglaman/phpstan-drupal:^1.1.2 \
9494
phpstan/phpstan-deprecation-rules:^1.0.0 \
9595
jangregor/phpstan-prophecy:^1.0.0 \

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ parameters:
2222
# yet, disable for now.
2323
checkGenericClassInNonGenericObjectType: false
2424
ignoreErrors:
25+
# PHPStan bug, ignore for now.
26+
-
27+
message: "#^Unreachable statement \\- code above always terminates\\.$#"
28+
count: 1
29+
path: src/Entity/Server.php
2530
# @todo Ignore phpstan-drupal extension's rules for now, activate later.
2631
- '#\Drupal calls should be avoided in classes, use dependency injection instead#'
2732
# new static() is a best practice in Drupal, so we cannot fix that.

0 commit comments

Comments
 (0)