Skip to content

Commit

Permalink
Ignore PHPStan iterable errors for preprocess functions
Browse files Browse the repository at this point in the history
$variables is a mixed bag of stuff. This is in line with what we do for
other parts of Drupal.
  • Loading branch information
kasperg committed Oct 12, 2023
1 parent efdf26c commit 414e099
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ parameters:
# Drupal Form API makes extensive use for arrays which we cannot provide
# more detailed typing of.
- '#.*\:\:(buildForm|getEditableConfigNames|submitForm|validateForm)\(\) .* no value type specified in iterable type array\.#'
# Drupal preprocess functions uses variables array which we cannot provide more detailed typing of.
- '#Function .*_preprocess_.*\(\) has parameter \$variables with no value type specified in iterable type array\.#'
# Drupal has many different iterable interfaces we do not want to provide
# iterable typing for.
- '#no value type specified in iterable type Drupal\\.*Interface#'
Expand Down

0 comments on commit 414e099

Please sign in to comment.