forked from rectorphp/rector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Handle (object) cast on CompleteVarDocTypePropertyR…
…ector (rectorphp#503)
- Loading branch information
1 parent
dfbd366
commit 34c3e8f
Showing
2 changed files
with
43 additions
and
0 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
37 changes: 37 additions & 0 deletions
37
.../Rector/Property/CompleteVarDocTypePropertyRector/Fixture/object_cast_to_stdclass.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,37 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\CompleteVarDocTypePropertyRector\Fixture; | ||
|
||
class ObjectCastToStdClass | ||
{ | ||
/** | ||
* @var object[] | ||
*/ | ||
private static $services = []; | ||
|
||
public static function register(array $service) | ||
{ | ||
self::$services[] = (object) $service; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\CompleteVarDocTypePropertyRector\Fixture; | ||
|
||
class ObjectCastToStdClass | ||
{ | ||
/** | ||
* @var \stdClass[] | ||
*/ | ||
private static $services = []; | ||
|
||
public static function register(array $service) | ||
{ | ||
self::$services[] = (object) $service; | ||
} | ||
} | ||
|
||
?> |