| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 16 | public static function load(array $data): UserPicture |
||
| 17 | { |
||
| 18 | $userPicture = new self; |
||
| 19 | Assert::string($data['path']); |
||
| 20 | Assert::integer($data['width']); |
||
| 21 | Assert::integer($data['height']); |
||
| 22 | Assert::boolean($data['isDefault']); |
||
| 23 | |||
| 24 | $userPicture->setPath($data['path']); |
||
| 25 | $userPicture->setWidth($data['width']); |
||
| 26 | $userPicture->setHeight($data['height']); |
||
| 27 | $userPicture->setIsDefault($data['isDefault']); |
||
| 28 | |||
| 29 | |||
| 30 | return $userPicture; |
||
| 31 | } |
||
| 79 |