| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function register() |
||
| 18 | { |
||
| 19 | $this->getContainer()->share(Client::class, function () { |
||
| 20 | return new Client('http://'.getenv('ETCD_SERVICE_HOST').':'.getenv('ETCD_SERVICE_PORT')); |
||
| 21 | }); |
||
| 22 | $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 | }); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |