| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function register(Container $pimple) |
||
| 24 | { |
||
| 25 | $pimple['encryptor'] = function ($pimple) { |
||
| 26 | return new Encryptor( |
||
| 27 | $pimple['config']['corp_id'], |
||
| 28 | $pimple['config']['token'], |
||
| 29 | $pimple['config']['aes_key'] |
||
| 30 | ); |
||
| 31 | }; |
||
| 32 | |||
| 33 | $pimple['server'] = function ($pimple) { |
||
| 34 | $server = new Guard($pimple['config']['token'], $pimple['config']['corp_id']); |
||
| 35 | |||
| 36 | $server->debug($pimple['config']['debug']); |
||
| 37 | |||
| 38 | $server->setEncryptor($pimple['encryptor']); |
||
| 39 | |||
| 40 | return $server; |
||
| 41 | }; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |