-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodingStyle] Handle null item on ManualJsonStringToJsonEncodeArrayRe…
…ctor (#791) * failing fixture null item on ManualJsonStringToJsonEncodeArrayRector * fix null item on ManualJsonStringToJsonEncodeArrayRector * phpstan
- Loading branch information
1 parent
5058437
commit ec7c68f
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...dingStyle/Rector/Assign/ManualJsonStringToJsonEncodeArrayRector/Fixture/null_item.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,28 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\Assign\ManualJsonStringToJsonEncodeArrayRector\Fixture; | ||
|
||
final class NullItem | ||
{ | ||
public function run() | ||
{ | ||
$json = '{"a":null}'; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\Assign\ManualJsonStringToJsonEncodeArrayRector\Fixture; | ||
|
||
final class NullItem | ||
{ | ||
public function run() | ||
{ | ||
$jsonData = ['a' => null]; | ||
$json = \Nette\Utils\Json::encode($jsonData); | ||
} | ||
} | ||
|
||
?> |
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