-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bleeding edge - check existing classes in
@param-closure-this
- Loading branch information
1 parent
b04b3bf
commit 2fa539a
Showing
5 changed files
with
104 additions
and
4 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
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
27 changes: 27 additions & 0 deletions
27
tests/PHPStan/Rules/Functions/data/param-closure-this-classes.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,27 @@ | ||
<?php | ||
|
||
namespace ParamClosureThisClassesFunctions; | ||
|
||
trait FooTrait | ||
{ | ||
|
||
} | ||
|
||
class Foo | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* @param-closure-this Nonexistent $a | ||
* @param-closure-this FooTrait $b | ||
* @param-closure-this fOO $c | ||
*/ | ||
function doFoo( | ||
callable $a, | ||
callable $b, | ||
callable $c | ||
): void | ||
{ | ||
|
||
} |
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
32 changes: 32 additions & 0 deletions
32
tests/PHPStan/Rules/Methods/data/param-closure-this-classes.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,32 @@ | ||
<?php | ||
|
||
namespace ParamClosureThisClasses; | ||
|
||
trait FooTrait | ||
{ | ||
|
||
} | ||
|
||
class Foo | ||
{ | ||
|
||
} | ||
|
||
class Bar | ||
{ | ||
|
||
/** | ||
* @param-closure-this Nonexistent $a | ||
* @param-closure-this FooTrait $b | ||
* @param-closure-this fOO $c | ||
*/ | ||
public function doFoo( | ||
callable $a, | ||
callable $b, | ||
callable $c | ||
): void | ||
{ | ||
|
||
} | ||
|
||
} |