| Conditions | 3 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 95 | public static function fromApi(array $data): self |
||
| 96 | { |
||
| 97 | return new self( |
||
| 98 | $data['name'], |
||
| 99 | $data['country'] ?? null, |
||
| 100 | $data['age'] ? (int) $data['age'] : null, |
||
| 101 | $data['gender'] ?? null, |
||
| 102 | $data['playcount'] ? (int) $data['playcount'] : 0, |
||
| 103 | $data['url'] ?? null |
||
| 104 | ); |
||
| 105 | } |
||
| 106 | } |
||
| 107 |