Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Dec 6, 2024
1 parent 6745295 commit 48bb62f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace TomasVotruba\UnusedPublic\Tests\Rules\UnusedPublicClassMethodRule\Fixture;

/**
* @var \TomasVotruba\UnusedPublic\Tests\Rules\UnusedPublicClassMethodRule\Source\Caller1 $caller1
*/

$c = new MyClass();
$c->myMethod([$caller1, 'callIt']);

class MyClass {
function myMethod(callable $c) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public static function provideData(): Iterator
yield [[__DIR__ . '/Fixture/plain-call-user-func.php', __DIR__ . '/Source/Caller1.php'], []];
yield [[__DIR__ . '/Fixture/plain-call-shutdown-function.php', __DIR__ . '/Source/Caller1.php'], []];
yield [[__DIR__ . '/Fixture/plain-call-custom-function.php', __DIR__ . '/Source/Caller1.php'], []];
yield [[__DIR__ . '/Fixture/plain-call-custom-method.php', __DIR__ . '/Source/Caller1.php'], []];
yield [[__DIR__ . '/Fixture/SkipCrashBug89.php.inc'], []];

yield [[__DIR__ . '/Fixture/SkipJsonSerialize.php'], []];
Expand Down

0 comments on commit 48bb62f

Please sign in to comment.