-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99c1313
commit 3ffff94
Showing
5 changed files
with
117 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Param; | ||
|
||
class SelfOutAttributeTest | ||
{ | ||
/** | ||
* @phpstan-self-out self<T> | ||
*/ | ||
public function add() | ||
{ | ||
} | ||
|
||
/** | ||
* @phpstan-this-out self<T> | ||
*/ | ||
public function addThis() | ||
{ | ||
} | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
* @phpstan-self-out self<T> | ||
*/ | ||
public function addMore() | ||
{ | ||
} | ||
|
||
/** | ||
* @phpstan-self-out self<T> | ||
*/ | ||
#[Param(name:'string')] | ||
public function addAnother() | ||
{ | ||
} | ||
|
||
/** | ||
* @phpstan-self-out self<T> this is the new type | ||
*/ | ||
public function addUserName() | ||
{ | ||
} | ||
|
||
/** | ||
* @psalm-self-out self<T> | ||
*/ | ||
public function addPsalm() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Param; | ||
|
||
class SelfOutAttributeTest | ||
{ | ||
#[\PhpStaticAnalysis\Attributes\SelfOut('self<T>')] | ||
public function add() | ||
{ | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\SelfOut('self<T>')] | ||
public function addThis() | ||
{ | ||
} | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
#[\PhpStaticAnalysis\Attributes\SelfOut('self<T>')] | ||
public function addMore() | ||
{ | ||
} | ||
|
||
#[Param(name:'string')] | ||
#[\PhpStaticAnalysis\Attributes\SelfOut('self<T>')] | ||
public function addAnother() | ||
{ | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\SelfOut('self<T>')] // this is the new type | ||
public function addUserName() | ||
{ | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\SelfOut('self<T>')] | ||
public function addPsalm() | ||
{ | ||
} | ||
} | ||
|
||
?> |