Skip to content

Commit

Permalink
It's already a list, no need to call array_values() (#253)
Browse files Browse the repository at this point in the history
This is a new bleeding edge rule added in PHPStan 1.10.59 which resulted in "Parameter #1 $array (non-empty-list<string>) of array_values is already a list, call has no effect."
  • Loading branch information
spaze authored Feb 20, 2024
2 parents d0b3d66 + d0f8166 commit d363d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DisallowedCallFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function createFromConfig(array $config): array
foreach ((array)($disallowed['exclude'] ?? []) as $exclude) {
$excludes[] = $this->normalizer->normalizeCall($exclude);
}
$calls = array_values((array)$calls);
$calls = (array)$calls;
try {
foreach ($calls as $call) {
$disallowedCall = new DisallowedCall(
Expand Down

0 comments on commit d363d00

Please sign in to comment.