| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function __construct( |
||
| 39 | UserId $userId, |
||
| 40 | ClientEntityInterface $client, |
||
| 41 | array $scopes = [], |
||
| 42 | DateTimeInterface $expiryDate = null |
||
| 43 | ) { |
||
| 44 | $this->setIdentifier(new OauthAccessTokenId()); |
||
| 45 | $this->setUserIdentifier($userId); |
||
| 46 | $this->setClient($client); |
||
| 47 | foreach ($scopes as $scope) { |
||
| 48 | $this->addScope($scope); |
||
| 49 | } |
||
| 50 | if ($expiryDate) { |
||
| 51 | $this->setExpiryDateTime( |
||
| 52 | $expiryDate instanceof DateTimeImmutable |
||
| 53 | ? DateTime::createFromImmutable($expiryDate) |
||
| 54 | : $expiryDate |
||
| 55 | ); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 77 |