Skip to content

Commit

Permalink
It's already a list, no need to call array_values()
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 committed Feb 20, 2024
1 parent d0b3d66 commit d0f8166
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 d0f8166

Please sign in to comment.