-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report only relevant unable to resolve template type message
- Loading branch information
1 parent
959b6e9
commit a5f9f0c
Showing
7 changed files
with
86 additions
and
10 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
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
44 changes: 44 additions & 0 deletions
44
tests/PHPStan/Rules/Methods/data/only-relevant-unable-to-resolve-template-type.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,44 @@ | ||
<?php | ||
|
||
namespace OnlyRelevantUnableToResolve; | ||
|
||
class Foo | ||
{ | ||
|
||
/** | ||
* @template T | ||
* @param T $a | ||
* @return T[] | ||
*/ | ||
public function doFoo($a) | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* @template T | ||
* @return int[] | ||
*/ | ||
public function doBar() | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* @template T | ||
* @template U | ||
* @return T | ||
*/ | ||
public function doBaz() | ||
{ | ||
|
||
} | ||
|
||
public function doLorem() | ||
{ | ||
$this->doFoo(1); | ||
$this->doBar(); | ||
$this->doBaz(); | ||
} | ||
|
||
} |