| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 57.89% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | trait AuthorizationServerTrait |
||
| 13 | { |
||
| 14 | 1 | use GrantsTrait; |
|
| 15 | 1 | use CryptKeysTrait; |
|
| 16 | |||
| 17 | 2 | public function registerAuthorizationServer() |
|
| 18 | { |
||
| 19 | 2 | $this->registerCryptKeys(); |
|
| 20 | |||
| 21 | 2 | $this->getContainer()->alias('hello.server', AuthorizationServer::class); |
|
|
|
|||
| 22 | |||
| 23 | 2 | $this->getContainer()->share('hello.server', function () { |
|
| 24 | 2 | $server = $this->createAuthorizationServer(); |
|
| 25 | 2 | $this->registerGrants($server); |
|
| 26 | 2 | return $server; |
|
| 27 | 2 | }); |
|
| 28 | 2 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return AuthorizationServer |
||
| 32 | */ |
||
| 33 | protected function createAuthorizationServer() |
||
| 44 | } |
||
| 45 | } |
||
| 46 |