-
-
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.
Rollback ClassRenamePhpDocNodeVisitor to use clone $node to avoid unn…
…ecessary touch Identifier when no change (#3154) * Rollback ClassRenamePhpDocNodeVisitor to use clone $node to avoid unnecessary touch Identifier when no change * Fixed 🎉 * [ci-review] Rector Rectify * clean up * add auto import fqcn conflict same namespace * add deep namespace fixture Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
16680c4
commit 25dec6b
Showing
5 changed files
with
91 additions
and
13 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
32 changes: 32 additions & 0 deletions
32
...ssRector/FixtureAutoImportNames/auto_import_conflict_name_all_fqcn_same_namespace.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,32 @@ | ||
<?php | ||
|
||
namespace Foo2; | ||
|
||
class AutoImportConflictNameAllFqcnSameNamespace extends FooBar | ||
{ | ||
/** | ||
* @param \DateTime $foo | ||
* | ||
* @return \Foo2\Storage|\Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Foo2; | ||
|
||
use DateTime; | ||
class AutoImportConflictNameAllFqcnSameNamespace extends FooBar | ||
{ | ||
/** | ||
* @param DateTime $foo | ||
* | ||
* @return Storage|\Illuminate\Support\Facades\Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> |
33 changes: 33 additions & 0 deletions
33
...r/FixtureAutoImportNames/auto_import_conflict_name_all_fqcn_same_namespace_inside.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,33 @@ | ||
<?php | ||
|
||
namespace Foo2; | ||
|
||
class AutoImportConflictNameAllFqcnSameNamespaceInside extends FooBar | ||
{ | ||
/** | ||
* @param \DateTime $foo | ||
* | ||
* @return \Foo2\Bar\Storage|\Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Foo2; | ||
|
||
use DateTime; | ||
use Foo2\Bar\Storage; | ||
class AutoImportConflictNameAllFqcnSameNamespaceInside extends FooBar | ||
{ | ||
/** | ||
* @param DateTime $foo | ||
* | ||
* @return Storage|\Illuminate\Support\Facades\Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> |
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
8 changes: 8 additions & 0 deletions
8
rules-tests/Renaming/Rector/Name/RenameClassRector/Source/Foo2/Bar/Storage.php
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,8 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Foo2\Bar; | ||
|
||
class Storage | ||
{} |