Conditions | 4 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
25 | public static function fromJson(array $data) |
||
26 | { |
||
27 | $instance = new self(); |
||
28 | $instance |
||
29 | ->setBronze(array_key_exists('bronze', $data) ? $data['bronze'] : null) |
||
30 | ->setGold(array_key_exists('gold', $data) ? $data['gold'] : null) |
||
31 | ->setSilver(array_key_exists('silver', $data) ? $data['silver'] : 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.