-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip union if parent type in ClassMethodParamTypeCompleter (#1103)
- Loading branch information
1 parent
b8a1d72
commit 99f0681
Showing
4 changed files
with
29 additions
and
2 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
22 changes: 22 additions & 0 deletions
22
...sMethod/AddMethodCallBasedStrictParamTypeRector/FixtureUnion/skip_union_if_parent.php.inc
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,22 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\FixtureUnion; | ||
|
||
use PhpParser\Node\Expr; | ||
use PhpParser\Node\Expr\MethodCall; | ||
use PhpParser\Node\Expr\StaticCall; | ||
use PhpParser\Node\Scalar\String_; | ||
|
||
final class SkipUnionIfParent | ||
{ | ||
public function run(MethodCall $methodCall, StaticCall $staticCall, String_ $string) | ||
{ | ||
$this->someExpr($methodCall); | ||
$this->someExpr($staticCall); | ||
$this->someExpr($string); | ||
} | ||
|
||
private function someExpr(Expr $expr) | ||
{ | ||
} | ||
} |
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
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