Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public static function createFromResponse(\stdClass $response): self |
||
15 | { |
||
16 | $player = new self(); |
||
17 | |||
18 | $player->id = $response->relGuid; |
||
19 | $player->name = $response->naam; |
||
20 | $player->membershipNumber = $response->lidNr; |
||
21 | $player->birthDate = \DateTimeImmutable::createFromFormat('d-m-Y', $response->sGebDat); |
||
22 | $player->affiliationDate = \DateTimeImmutable::createFromFormat('d-m-Y H:i', $response->sAanslDat) ?: null; |
||
23 | |||
24 | return $player; |
||
25 | } |
||
51 | } |