Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public static function createFromJson(string $json) : GetPortListParameters |
||
33 | { |
||
34 | $parameters = json_decode($json, (bool) JSON_OBJECT_AS_ARRAY); |
||
35 | if (json_last_error() !== JSON_ERROR_NONE) { |
||
36 | throw new InvalidArgumentException( |
||
37 | 'GetPortListParametersFactory Error: ' . json_last_error_msg() |
||
38 | ); |
||
39 | } |
||
40 | return self::createFromArray($parameters); |
||
41 | } |
||
43 |