-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PostRector] Allow remove unused use sub namespace on UnusedImportRem…
…ovingPostRector (#5299) * [PostRector] Allow remove unused use sub namespace on UnusedImportRemovingPostRector * more fixture * more fixtures * more fixture * implemented 🎉 * fix phpstan * fix phpstan
- Loading branch information
1 parent
e48234e
commit 7badba6
Showing
6 changed files
with
111 additions
and
2 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
12 changes: 12 additions & 0 deletions
12
tests/Issues/NamespacedUse/Fixture/skip_subnamespace_from_namespace_in_use.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,12 @@ | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
use App\Bar\Baz; | ||
|
||
final class SkipSubNamepaceFromNamespaceInUse | ||
{ | ||
public function run(Baz $baz) | ||
{ | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/Issues/NamespacedUse/Fixture/skip_subnamespace_used.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,12 @@ | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
use App; | ||
|
||
final class SkipSubNamespaceUsed | ||
{ | ||
public function run(App\Baz $baz) | ||
{ | ||
} | ||
} |
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,21 @@ | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
use App; | ||
|
||
final class SubNamespace | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
final class SubNamespace | ||
{ | ||
} | ||
|
||
?> |
27 changes: 27 additions & 0 deletions
27
tests/Issues/NamespacedUse/Fixture/subnamespace_from_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,27 @@ | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
use App; | ||
|
||
final class SubNamepaceFromNamespace | ||
{ | ||
public function run(Baz $baz) | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
final class SubNamepaceFromNamespace | ||
{ | ||
public function run(Baz $baz) | ||
{ | ||
} | ||
} | ||
|
||
?> |
27 changes: 27 additions & 0 deletions
27
tests/Issues/NamespacedUse/Fixture/subnamespace_from_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,27 @@ | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
use App; | ||
|
||
final class SubNamepaceFromNamespace2 | ||
{ | ||
public function run(Bar\Baz $baz) | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace App\Bar; | ||
|
||
final class SubNamepaceFromNamespace2 | ||
{ | ||
public function run(Bar\Baz $baz) | ||
{ | ||
} | ||
} | ||
|
||
?> |