Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
47 | static function fromArray($raw) |
||
|
|||
48 | { |
||
49 | $item = new self; |
||
50 | |||
51 | $item->raw = $raw; |
||
52 | |||
53 | $item->productType = $raw['productType']; |
||
54 | $item->name = $raw['name']; |
||
55 | $item->url = $raw['url']; |
||
56 | $item->urlThumb = $raw['urlThumb']; |
||
57 | $item->profit = $raw['profit']; |
||
58 | |||
59 | return $item; |
||
60 | } |
||
61 | } |
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.