Conditions | 4 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | public static function fromJson(array $data) |
||
26 | { |
||
27 | $instance = new self(); |
||
28 | $instance |
||
29 | ->setId(array_key_exists('error_id', $data) ? $data['error_id'] : null) |
||
30 | ->setName(array_key_exists('error_name', $data) ? $data['error_name'] : null) |
||
31 | ->setDescription(array_key_exists('description', $data) ? $data['description'] : null); |
||
32 | |||
33 | return $instance; |
||
34 | } |
||
35 | |||
83 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.