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,14 @@
<?php

namespace Rector\PHPUnit\Tests\PHPUnit120\Rector\CallLike\CreateStubOverCreateMockArgRector\Fixture;

use PHPUnit\Framework\TestCase;
use Utils\PHPStan\Tests\Rule\PHPUnit\StubOverMockArgRule\Source\AnyClass;

class SkipFirstClassCallable extends TestCase
{
public function testThat()
{
AnyClass::staticRun(...);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public function refactor(Node $node): MethodCall|StaticCall|New_|ArrayItem|null

$hasChanges = false;

if ($node->isFirstClassCallable()) {
return null;
}

foreach ($node->getArgs() as $arg) {
if (! $arg->value instanceof MethodCall) {
continue;
Expand Down