-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php74] Handle Generic Type on TypedPropertyRector (#6378)
Co-authored-by: Ruud Kamphuis <ruudk@users.noreply.github.com> Co-authored-by: kaizen-ci <info@kaizen-ci.org>
- Loading branch information
1 parent
85c8756
commit 6bae025
Showing
2 changed files
with
86 additions
and
15 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
rules-tests/Php74/Rector/Property/TypedPropertyRector/Fixture/generic_object_type.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\Php74\Tests\Rector\Property\TypedPropertyRector\Fixture; | ||
|
||
/** | ||
* @template T of object | ||
*/ | ||
final class GenericObjectType | ||
{ | ||
/** | ||
* @var T | ||
*/ | ||
private $command; | ||
|
||
/** | ||
* @param T $command | ||
*/ | ||
public function __construct(object $command) | ||
{ | ||
$this->command = $command; | ||
} | ||
} | ||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Php74\Tests\Rector\Property\TypedPropertyRector\Fixture; | ||
|
||
/** | ||
* @template T of object | ||
*/ | ||
final class GenericObjectType | ||
{ | ||
/** | ||
* @var T | ||
*/ | ||
private object $command; | ||
|
||
/** | ||
* @param T $command | ||
*/ | ||
public function __construct(object $command) | ||
{ | ||
$this->command = $command; | ||
} | ||
} | ||
?> |
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