Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ parameters:
# yet, disable for now.
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
# PHPStan bug, ignore for now.
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/Entity/Server.php
# @todo Ignore phpstan-drupal extension's rules for now, activate later.
- '#\Drupal calls should be avoided in classes, use dependency injection instead#'
# new static() is a best practice in Drupal, so we cannot fix that.
Expand Down
3 changes: 3 additions & 0 deletions src/Entity/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ protected function getValidationRules() {
return [];
}

// PHPStan thinks this is unreachable code because of the wrongly
// documented $params->queryId.
// @phpstan-ignore-next-line
$rules = array_values(DocumentValidator::defaultRules());
if ($this->getDisableIntrospection()) {
$rules[] = new DisableIntrospection();
Expand Down