-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php82] Skip non-FilesystemIterator on FilesystemIteratorSkipDotsRect…
…or (#3298) * [Php82] Skip non-FilesystemIterator on FilesystemIteratorSkipDotsRector * Fixed 🎉 * [ci-review] Rector Rectify * skip use variable * eol Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
6ff4617
commit 9cb97aa
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...tor/New_/FilesystemIteratorSkipDots/Fixture/skip_non_filesystem_iterator_instance.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,13 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php82\Rector\New_\FilesystemIteratorSkipDots\Fixture; | ||
|
||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
|
||
final class SkipNonFileSystemIteratorInstance | ||
{ | ||
public function run($input, $output) | ||
{ | ||
return new SymfonyStyle($input, $output); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
rules-tests/Php82/Rector/New_/FilesystemIteratorSkipDots/Fixture/skip_use_variable.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,16 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php82\Rector\New_\FilesystemIteratorSkipDots\Fixture; | ||
|
||
use FilesystemIterator; | ||
|
||
final class SkipUseVariable | ||
{ | ||
public function getIterator(): FilesystemIterator | ||
{ | ||
$variable = FilesystemIterator::SKIP_DOTS; | ||
return new FilesystemIterator(__DIR__, $variable); | ||
} | ||
} | ||
|
||
?> |
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