| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace nyx\auth\id\identities; |
||
| 25 | public function __construct(oauth2\Token $token, array $data) |
||
| 26 | { |
||
| 27 | parent::__construct($token, $data); |
||
| 28 | |||
| 29 | $this->username = $data['nickname'] ?? null; |
||
| 30 | $this->name = $data['displayName'] ?? null; |
||
| 31 | $this->email = $data['emails'][0]['value'] ?? null; |
||
| 32 | |||
| 33 | if (isset($data['image'])) { |
||
| 34 | $this->avatar = $data['image']['url'] ?? null; |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 |