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
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Rector\Tests\TypeDeclarationDocblocks\Rector\Class_\ClassMethodArrayDocblockParamFromLocalCallsRector\Fixture;

class SkipWithFirstClassCallable
{
public function go()
{
$this->run(['item1', 'item2']);

$this->run(...)([1, 2]);
}

private function run(array $items)
{
}
}
2 changes: 1 addition & 1 deletion rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function resolveTypesFromCalls(array $calls): array
foreach ($calls as $call) {
foreach ($call->args as $position => $arg) {
if ($this->shouldSkipArg($arg)) {
continue;
return [];
}

/** @var Arg $arg */
Expand Down
Loading