-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Param doctype not copied to property in DowngradePropertyPromotionRec…
…tor (#734) * Param doctype not copied to property in DowngradePropertyPromotionRector * Fix fixture by adding strict types * Add param type to downgraded property * Update rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php Change how constructor is found Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com> Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
- Loading branch information
1 parent
af1cbb9
commit 138aa5e
Showing
2 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...ngradePhp80/Rector/Class_/DowngradePropertyPromotionRector/Fixture/use_param_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,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\DowngradePhp80\Rector\Class_\DowngradePropertyPromotionRector\Fixture; | ||
|
||
final class UseParamType | ||
{ | ||
/** | ||
* @param array<string, int> $values | ||
*/ | ||
public function __construct( | ||
private array $values | ||
) { | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\DowngradePhp80\Rector\Class_\DowngradePropertyPromotionRector\Fixture; | ||
|
||
final class UseParamType | ||
{ | ||
/** | ||
* @var array<string, int> | ||
*/ | ||
private array $values; | ||
/** | ||
* @param array<string, int> $values | ||
*/ | ||
public function __construct(array $values) | ||
{ | ||
$this->values = $values; | ||
} | ||
} | ||
|
||
?> |
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