-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rules] Skip Closure/callable on NarrowPublicClassMethodParamTypeRule (…
…#21)
- Loading branch information
1 parent
df83404
commit a0812a4
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipCallable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\TypePerfect\Tests\Rules\ReturnNullOverFalseRule\Fixture; | ||
|
||
final class SkipCallable | ||
{ | ||
public function map(callable $mapper): array | ||
{ | ||
return []; | ||
} | ||
|
||
public function run() | ||
{ | ||
$this->map(function () {}); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipClosure.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\TypePerfect\Tests\Rules\ReturnNullOverFalseRule\Fixture; | ||
|
||
final class SkipClosure | ||
{ | ||
public function map(\Closure $mapper): array | ||
{ | ||
return []; | ||
} | ||
|
||
public function run() | ||
{ | ||
$this->map(function () {}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters