-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Add return static property support on ReturnTypeFro…
…mStrictTypedPropertyRector (#5050) * [TypeDeclaration] Add return static property support on ReturnTypeFromStrictTypedPropertyRector * Fixed 🎉 * trigger CI
- Loading branch information
1 parent
76611f6
commit 5ee831f
Showing
2 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...lassMethod/ReturnTypeFromStrictTypedPropertyRector/Fixture/return_static_property.php.inc
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,47 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector\Fixture; | ||
|
||
class ReturnStaticProperty | ||
{ | ||
/** | ||
* @var Service[] | ||
*/ | ||
private static array $registry = []; | ||
|
||
/** | ||
* find registered Service. | ||
* | ||
* @return Service[] | ||
*/ | ||
public static function getRegisteredServices() | ||
{ | ||
return self::$registry; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector\Fixture; | ||
|
||
class ReturnStaticProperty | ||
{ | ||
/** | ||
* @var Service[] | ||
*/ | ||
private static array $registry = []; | ||
|
||
/** | ||
* find registered Service. | ||
* | ||
* @return Service[] | ||
*/ | ||
public static function getRegisteredServices(): array | ||
{ | ||
return self::$registry; | ||
} | ||
} | ||
|
||
?> |
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