| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function __construct($client, $user, $credentials, $providerKey, array $roles = [], array $scopes = []) |
||
| 15 | { |
||
| 16 | parent::__construct($roles); |
||
| 17 | |||
| 18 | $this->client = $client; |
||
| 19 | |||
| 20 | if (empty($providerKey)) { |
||
| 21 | throw new \InvalidArgumentException('$providerKey must not be empty.'); |
||
| 22 | } |
||
| 23 | |||
| 24 | if (null !== $user) { |
||
| 25 | $this->setUser($user); |
||
| 26 | } |
||
| 27 | $this->credentials = $credentials; |
||
| 28 | $this->providerKey = $providerKey; |
||
| 29 | $this->setAttribute('scopes', $scopes); |
||
| 30 | |||
| 31 | $this->setAuthenticated(count($roles) > 0); |
||
| 32 | } |
||
| 33 | |||
| 50 |