-
-
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.
Add the PropertyRead and PropertyWrite attributes
- Loading branch information
1 parent
fcda73e
commit 33ceb3e
Showing
6 changed files
with
91 additions
and
9 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,37 @@ | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Template; | ||
|
||
/** | ||
* @deprecated | ||
* @property-read string $name | ||
* @psalm-property-read int $num | ||
* @phpstan-property-read string[] $index | ||
*/ | ||
#[Template('T')] | ||
class PropertyReadAttributeTest | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Template; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
#[Template('T')] | ||
#[\PhpStaticAnalysis\Attributes\PropertyRead(name: 'string')] | ||
#[\PhpStaticAnalysis\Attributes\PropertyRead(num: 'int')] | ||
#[\PhpStaticAnalysis\Attributes\PropertyRead(index: 'string[]')] | ||
class PropertyReadAttributeTest | ||
{ | ||
} | ||
|
||
?> |
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,37 @@ | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Template; | ||
|
||
/** | ||
* @deprecated | ||
* @property-write string $name | ||
* @psalm-property-write int $num | ||
* @phpstan-property-write string[] $index | ||
*/ | ||
#[Template('T')] | ||
class PropertyWriteAttributeTest | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace test\PhpStaticAnalysis\RectorRule\Fixture; | ||
|
||
use PhpStaticAnalysis\Attributes\Template; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
#[Template('T')] | ||
#[\PhpStaticAnalysis\Attributes\PropertyWrite(name: 'string')] | ||
#[\PhpStaticAnalysis\Attributes\PropertyWrite(num: 'int')] | ||
#[\PhpStaticAnalysis\Attributes\PropertyWrite(index: 'string[]')] | ||
class PropertyWriteAttributeTest | ||
{ | ||
} | ||
|
||
?> |