-
-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Renaming] Do not rename class with same name inside different namesp…
…ace on RenameClassRector (#2455) * Another failing test for #7209 * fixture * fixture * Closes #2452 * try * try * back * Fixed 🎉 * final touch: add example used in union Co-authored-by: Einar Gangsø <mail@einargangso.no>
- Loading branch information
1 parent
ba48cd2
commit cb1473a
Showing
3 changed files
with
72 additions
and
0 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
34 changes: 34 additions & 0 deletions
34
...tureAutoImportNames/do_not_rename_class_with_same_name_inside_different_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,34 @@ | ||
<?php | ||
|
||
namespace Foo; | ||
|
||
class Foo extends FooBar | ||
{ | ||
/** | ||
* @param \DateTime $foo | ||
* | ||
* Storage here is Foo\Storage. Not \Storage. | ||
* @return Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Foo; | ||
|
||
use DateTime; | ||
class Foo extends FooBar | ||
{ | ||
/** | ||
* @param DateTime $foo | ||
* | ||
* Storage here is Foo\Storage. Not \Storage. | ||
* @return Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> |
32 changes: 32 additions & 0 deletions
32
...ureAutoImportNames/do_not_rename_class_with_same_name_inside_different_namespace2.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 Foo2 extends FooBar | ||
{ | ||
/** | ||
* @param \DateTime $foo | ||
* | ||
* @return Storage|\Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Foo2; | ||
|
||
use DateTime; | ||
class Foo2 extends FooBar | ||
{ | ||
/** | ||
* @param DateTime $foo | ||
* | ||
* @return Storage|\Illuminate\Support\Facades\Storage | ||
*/ | ||
public function bar($foo){} | ||
} | ||
|
||
?> |