Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | static function fromArray($raw) |
||
|
|||
42 | { |
||
43 | if(!$raw){ |
||
44 | return null; |
||
45 | } |
||
46 | |||
47 | $item = new self; |
||
48 | |||
49 | $item->raw = $raw; |
||
50 | |||
51 | $item->status = $raw['status']; |
||
52 | $item->reasonFailed = $raw['reasonFailed']; |
||
53 | $item->urlLarge = $raw['urlLarge']; |
||
54 | $item->urlMedium = $raw['urlMedium']; |
||
55 | |||
56 | return $item; |
||
57 | } |
||
58 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.