-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip mixing native + docblock union assign on Typed…
…PropertyFromAssignsRector (#4905) * [TypeDeclaration] Skip mixing native + docblock union assign on TypedPropertyFromAssignsRector * Fixed 🎉 * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
fcf0bc4
commit 824bb97
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...erty/TypedPropertyFromAssignsRector/Fixture/skip_mixed_native_with_docblock_union.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,24 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
use DateTime; | ||
use stdClass; | ||
|
||
final class SkipNativeWithDocblockUnion | ||
{ | ||
private $property; | ||
|
||
public function run1() | ||
{ | ||
$this->property = new stdClass; | ||
} | ||
|
||
/** | ||
* @param stdClass|DateTime $property | ||
*/ | ||
public function run2($property) | ||
{ | ||
$this->property = $property; | ||
} | ||
} |
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