Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable missing types in array iterables check in analysis mode #278

Closed
wants to merge 1 commit into from
Closed
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
Disable missing types in array iterables check in analysis mode
  • Loading branch information
googletorp committed May 29, 2022
commit 04f491449f9b8a5d36c653166e0cf27e91d770ac
6 changes: 5 additions & 1 deletion src/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int

if ($this->isAnalysisCheck) {
$configuration_data['parameters']['level'] = 6;
$ignored_analysis_errors = [];
$ignored_analysis_errors = [
// Ignores all missing types in array iterables.
// See more: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
'#value type specified in iterable type array.$#'
];
$configuration_data['parameters']['ignoreErrors'] = array_merge($ignored_analysis_errors, $configuration_data['parameters']['ignoreErrors']);
} else {
$configuration_data['parameters']['level'] = 2;
Expand Down