-
-
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.
[CodeQuality] Skip stdClass in IssetOnPropertyObjectToPropertyExistsR…
…ector, as always nested (#3166)
- Loading branch information
1 parent
045ada5
commit 7636b88
Showing
4 changed files
with
27 additions
and
35 deletions.
There are no files selected for viewing
29 changes: 0 additions & 29 deletions
29
...sset_/IssetOnPropertyObjectToPropertyExistsRector/Fixture/isset_on_built_in_class.php.inc
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
.../Isset_/IssetOnPropertyObjectToPropertyExistsRector/Fixture/skip_direct_std_class.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\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector\Fixture; | ||
|
||
use stdClass; | ||
|
||
final class SkipDirectStdClass | ||
{ | ||
public function x(stdClass $value) { | ||
isset($value->property); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...set_/IssetOnPropertyObjectToPropertyExistsRector/Fixture/skip_std_class_from_json.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,11 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector\Fixture; | ||
|
||
final class SkipStdClassFromJson | ||
{ | ||
public function run(string $contents) { | ||
$result = json_decode($contents); | ||
return isset($result->key->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