| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | protected function createRedisClient(Container $container): ServiceProviderInterface |
||
| 27 | { |
||
| 28 | $config = $container->offsetGet('config'); |
||
| 29 | |||
| 30 | $container->offsetSet('redis_client', function () use ($config) { |
||
| 31 | return new Client([ |
||
| 32 | 'scheme' => 'tcp', |
||
| 33 | 'host' => $config->get(RedisConstants::REDIS_HOST, RedisConstants::DEFAULT_REDIS_HOST), |
||
| 34 | 'port' => $config->get(RedisConstants::REDIS_PORT, RedisConstants::DEFAULT_REDIS_PORT), |
||
| 35 | ]); |
||
| 36 | }); |
||
| 37 | |||
| 38 | return $this; |
||
| 39 | } |
||
| 41 |