-
-
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
dbf405d
commit de0afce
Showing
19 changed files
with
168 additions
and
31 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,133 @@ | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Param; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
class DeprecatedAttributeTest | ||
{ | ||
/** | ||
* @deprecated | ||
*/ | ||
public const NAME = 'name'; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
public string $name = ''; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
public function getName(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
* @deprecated | ||
*/ | ||
public function getMoreNames(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
#[Param(name:'string')] | ||
public function getAnotherName($name) | ||
{ | ||
return "Hello " . $name; | ||
} | ||
|
||
/** | ||
* @deprecated use getNewUserName() instead | ||
*/ | ||
public function getUserName(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @psalm-deprecated | ||
*/ | ||
public function getPsalmName(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @phpstan-deprecated | ||
*/ | ||
public function getPHPStanName(): void | ||
{ | ||
} | ||
} | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
function getName(): void | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Param; | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
class DeprecatedAttributeTest | ||
{ | ||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public const NAME = 'name'; | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public string $name = ''; | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public function getName(): void | ||
{ | ||
} | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public function getMoreNames(): void | ||
{ | ||
} | ||
|
||
#[Param(name:'string')] | ||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public function getAnotherName($name) | ||
{ | ||
return "Hello " . $name; | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] // use getNewUserName() instead | ||
public function getUserName(): void | ||
{ | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public function getPsalmName(): void | ||
{ | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
public function getPHPStanName(): void | ||
{ | ||
} | ||
} | ||
|
||
#[\PhpStaticAnalysis\Attributes\Deprecated] | ||
function getName(): 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
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
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
Oops, something went wrong.