| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1.037 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 1 | public function register() |
|
| 18 | { |
||
| 19 | $this->getContainer()->share(Client::class, function () { |
||
| 20 | 1 | return new Client('http://'.getenv('ETCD_SERVICE_HOST').':'.getenv('ETCD_SERVICE_PORT')); |
|
| 21 | 1 | }); |
|
| 22 | 1 | $this->getContainer()->share(Etcd::class, function () { |
|
| 23 | $client = $this->getContainer()->get(Client::class); |
||
| 24 | $config = $this->getContainer()->get(Config::class); |
||
| 25 | return new Etcd($client, $config); |
||
| 26 | 1 | }); |
|
| 27 | 1 | } |
|
| 28 | } |
||
| 29 |