-
-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php80] Mirror additional docblock on importNames() on ClassPropertyA…
…ssignToConstructorPromotionRector (#2410) * [Php80] Mirror additional docblock on importNames() on ClassPropertyAssignToConstructorPromotionRector * update docblock var to param * add test for non auto import as well * Fixed 🎉
- Loading branch information
1 parent
e6ebae3
commit ca6dfe2
Showing
3 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
...lassPropertyAssignToConstructorPromotionRector/Fixture/mirror_additional_docblock.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,44 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\Fixture; | ||
|
||
use Doctrine\ORM\Mapping\Id; | ||
|
||
class MirrorAdditionalDocblock | ||
{ | ||
/** | ||
* @var string | ||
* @Id | ||
*/ | ||
public $name; | ||
|
||
public function __construct($name) | ||
{ | ||
$this->name = $name; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\Fixture; | ||
|
||
use Doctrine\ORM\Mapping\Id; | ||
|
||
class MirrorAdditionalDocblock | ||
{ | ||
/** | ||
* @param string $name | ||
*/ | ||
public function __construct( | ||
/** | ||
* @Id | ||
*/ | ||
public $name | ||
) | ||
{ | ||
} | ||
} | ||
|
||
?> |
44 changes: 44 additions & 0 deletions
44
...tyAssignToConstructorPromotionRector/FixtureAutoImport/mirror_additional_docblock.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,44 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\FixtureAutoImport; | ||
|
||
use Doctrine\ORM\Mapping\Id; | ||
|
||
class MirrorAdditionalDocblock | ||
{ | ||
/** | ||
* @var string | ||
* @Id | ||
*/ | ||
public $name; | ||
|
||
public function __construct($name) | ||
{ | ||
$this->name = $name; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\FixtureAutoImport; | ||
|
||
use Doctrine\ORM\Mapping\Id; | ||
|
||
class MirrorAdditionalDocblock | ||
{ | ||
/** | ||
* @param string $name | ||
*/ | ||
public function __construct( | ||
/** | ||
* @Id | ||
*/ | ||
public $name | ||
) | ||
{ | ||
} | ||
} | ||
|
||
?> |
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