-
-
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.
[e2e] handle multiple classes with anonymous class on MultipleClassFi…
…leToPsr4ClassesRector file removed (#3253) * [e2e] handle multiple classes with anonymous class on MultipleClassFileToPsr4ClassesRector * Fixed 🎉 * Final touch: eol * Really final touch: use ClassAnalyzer->isAnonymous() in other rules as well * [ci-review] Rector Rectify * Handle match and no match class with file * output in ci * Really Really Really final touch: eol * Final touch: display Applied rules: MultipleClassFileToPsr4ClassesRector * This is final touch: space Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
bce8153
commit 9a0938d
Showing
10 changed files
with
119 additions
and
6 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
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 @@ | ||
/vendor |
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,7 @@ | ||
{ | ||
"require": { | ||
"php": "^8.1" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
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,43 @@ | ||
! [NOTE] File | ||
! "./multiple-class-psr4/src/C | ||
! lassMatchFileName.php" will be added | ||
|
||
! [NOTE] File | ||
! "./multiple-class-psr4/src/S | ||
! omeInterface.php" will be added | ||
|
||
! [NOTE] File | ||
! "./multiple-class-psr4/src/S | ||
! omeClass.php" will be added | ||
|
||
! [NOTE] File | ||
! "./multiple-class-psr4/src/S | ||
! omeOtherInterface.php" will be added | ||
|
||
[WARNING] File "src/ClassNoMatchFileName.php" will be removed | ||
|
||
|
||
1 file with changes | ||
=================== | ||
|
||
1) src/ClassMatchFileName.php:1 | ||
|
||
---------- begin diff ---------- | ||
@@ @@ | ||
|
||
namespace App; | ||
|
||
-class ClassMatchFileName implements SomeInterface | ||
-{ | ||
-} | ||
- | ||
-interface SomeInterface | ||
-{ | ||
-} | ||
----------- end diff ----------- | ||
|
||
Applied rules: | ||
* MultipleClassFileToPsr4ClassesRector | ||
|
||
|
||
[OK] 1 file would have changed (dry-run) by Rector |
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,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
use Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector; | ||
|
||
return static function (RectorConfig $rectorConfig) : void { | ||
$rectorConfig->paths([ | ||
__DIR__ . '/src', | ||
]); | ||
|
||
$rectorConfig->rule(MultipleClassFileToPsr4ClassesRector::class); | ||
}; |
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,11 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
class ClassMatchFileName implements SomeInterface | ||
{ | ||
} | ||
|
||
interface SomeInterface | ||
{ | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
class SomeClass implements SomeOtherInterface | ||
{ | ||
} | ||
|
||
interface SomeOtherInterface | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
class WithAnonymousClass | ||
{ | ||
public function run() | ||
{ | ||
new class {}; | ||
} | ||
} |
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
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