We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 693a3cc commit cca504dCopy full SHA for cca504d
src/Transformer/ElementTransformer.php
@@ -30,12 +30,12 @@ public static function fromServer(?string $dataFromServer): ?array
30
31
$data = json_decode($dataFromServer);
32
33
- if ($data !== NULL) {
34
- foreach ($data as &$value) {
35
- ElementTransformer::stringValuesToObjects($value);
36
- }
37
- } else {
38
- throw new NotCallableResourceException();
+ if ($data === null) {
+ throw new NotCallableResourceException();
+ }
+
+ foreach ($data as &$value) {
+ ElementTransformer::stringValuesToObjects($value);
39
}
40
41
return $data;
0 commit comments