-
-
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.
Make use of StmtsAwareInterface (#3781)
- Loading branch information
1 parent
376f6cb
commit 89bc4d8
Showing
11 changed files
with
233 additions
and
165 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
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
21 changes: 21 additions & 0 deletions
21
...odeQuality/Rector/Foreach_/ForeachToInArrayRector/Fixture/skip_more_inner_foreach.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,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Foreach_\ForeachToInArrayRector\Fixture; | ||
|
||
final class SkipMoreInnerForeach | ||
{ | ||
public function run($value) | ||
{ | ||
foreach ($this->items as $item) { | ||
$value = 100; | ||
|
||
if (100 === $item) { | ||
return true; | ||
} | ||
} | ||
|
||
return $value; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...uality/Rector/Foreach_/ForeachToInArrayRector/Fixture/skip_return_value_in_return.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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Foreach_\ForeachToInArrayRector\Fixture; | ||
|
||
final class SkipReturnValueInReturn | ||
{ | ||
public function run($value) | ||
{ | ||
foreach ($this->items as $item) { | ||
if (100 === $item) { | ||
return true; | ||
} | ||
} | ||
|
||
return $value; | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
...espace_/ImportFullyQualifiedNamesRector/FixtureNonNamespaced/simple_with_strict_types.php
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,8 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
function simpleWithStrictTypes() | ||
{ | ||
$baz = new \Foo\Bar(); | ||
} |
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
Oops, something went wrong.