Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 57.14% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | trait CryptKeysTrait |
||
14 | { |
||
15 | 2 | public function registerCryptKeys() |
|
16 | { |
||
17 | 2 | $this->getContainer()->share('hello.keys.private', function () { |
|
|
|||
18 | return $this->makeCryptKey('private'); |
||
19 | 2 | }); |
|
20 | 2 | $this->getContainer()->share('hello.keys.public', function () { |
|
21 | return $this->makeCryptKey('public'); |
||
22 | 2 | }); |
|
23 | 2 | } |
|
24 | |||
25 | /** |
||
26 | * @param $return |
||
27 | * @return array |
||
28 | */ |
||
29 | protected function appendCryptKeysToProvide($return) |
||
30 | { |
||
31 | $return[] = 'hello.keys.private'; |
||
32 | $return[] = 'hello.keys.public'; |
||
33 | return $return; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Create a CryptKey instance without permissions check |
||
38 | * |
||
39 | * @param $type |
||
40 | * @return \League\OAuth2\Server\CryptKey |
||
41 | */ |
||
42 | 1 | protected function makeCryptKey($type) |
|
45 | } |
||
46 | } |
||
47 |