-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php71] Skip static or global on CountOnNullRector (#1742)
* [Php71] Skip static or global on CountOnNullRector * Fixed 🎉
- Loading branch information
1 parent
70d6465
commit 9db5159
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
rules-tests/Php71/Rector/FuncCall/CountOnNullRector/Fixture/skip_global.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,14 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php71\Rector\FuncCall\CountOnNullRector\Fixture; | ||
|
||
$data = ['test']; | ||
|
||
class SkipGlobal | ||
{ | ||
public function run() | ||
{ | ||
global $data; | ||
echo count($data); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
rules-tests/Php71/Rector/FuncCall/CountOnNullRector/Fixture/skip_static.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 Rector\Tests\Php71\Rector\FuncCall\CountOnNullRector\Fixture; | ||
|
||
class SkipStatic | ||
{ | ||
public function run() | ||
{ | ||
static $data = []; | ||
echo count($data); | ||
} | ||
} |
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