| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 11 | public static function createFromArray(array $round): self |
|
| 49 | { |
||
| 50 | 11 | Assert::string($round['type']); |
|
| 51 | 11 | Assert::string($round['id']); |
|
| 52 | 11 | Assert::integer($round['attributes']['duration']); |
|
| 53 | 11 | Assert::integer($round['attributes']['ordinal']); |
|
| 54 | 11 | Assert::integer($round['attributes']['stats']['winningTeam']); |
|
| 55 | |||
| 56 | 11 | return new self( |
|
| 57 | 11 | $round['type'], |
|
| 58 | 11 | $round['id'], |
|
| 59 | 11 | $round['attributes']['duration'], |
|
| 60 | 11 | $round['attributes']['ordinal'], |
|
| 61 | 11 | $round['attributes']['stats']['winningTeam'] |
|
| 62 | ); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |