forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add resolution of generic
@method
tags
- Loading branch information
1 parent
97408e6
commit e9b40b7
Showing
6 changed files
with
72 additions
and
1 deletion.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace GenericMethodTags; | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
/** | ||
* @method TVal doThing<TVal of mixed>(TVal $param) | ||
*/ | ||
class Test | ||
{ | ||
public function __call(): mixed | ||
{ | ||
} | ||
} | ||
|
||
function test(int $int, string $string): void | ||
{ | ||
$test = new Test(); | ||
|
||
assertType('int', $test->doThing($int)); | ||
assertType('string', $test->doThing($string)); | ||
} |