-
-
Notifications
You must be signed in to change notification settings - Fork 364
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 Docblock inner Namespace on RenameClassRector (
#2441) * Add failing test for rector/rector#7209 * update fixture * Closes #2440 * fixture Co-authored-by: Einar Gangsø <mail@einargangso.no>
- Loading branch information
1 parent
b1583c7
commit 40d9102
Showing
3 changed files
with
64 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
58 changes: 58 additions & 0 deletions
58
...e/RenameClassRector/FixtureAutoImportNames/do_not_rename_docblock_inner_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,58 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\FixtureAutoImportNames; | ||
|
||
use CompanyB\Storage; | ||
|
||
class DoNotRenameDocblockInnerNamespace | ||
{ | ||
/** | ||
* @var Storage | ||
*/ | ||
protected $storage; | ||
|
||
public function __construct( | ||
Storage $storage | ||
) { | ||
\Log::error('Some loggin'); | ||
|
||
$this->storage = $storage; | ||
} | ||
|
||
private function foo(): string | ||
{ | ||
new Foo($this->storage); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\FixtureAutoImportNames; | ||
|
||
use Log; | ||
use CompanyB\Storage; | ||
|
||
class DoNotRenameDocblockInnerNamespace | ||
{ | ||
/** | ||
* @var Storage | ||
*/ | ||
protected $storage; | ||
|
||
public function __construct( | ||
Storage $storage | ||
) { | ||
Log::error('Some loggin'); | ||
|
||
$this->storage = $storage; | ||
} | ||
|
||
private function foo(): string | ||
{ | ||
new Foo($this->storage); | ||
} | ||
} | ||
|
||
?> |
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