Code Duplication    Length = 7-9 lines in 2 locations

src/Horizon/HorizonServiceProvider.php 1 location

@@ 63-71 (lines=9) @@
60
     */
61
    public function register()
62
    {
63
        $this->app->singleton('redis-sentinel', function ($app) {
64
            $this->createHorizonConnectionConfiguration();
65
66
            $class = $this->config->getVersionedRedisSentinelManagerClass();
67
            $config = $this->config->get('database.redis-sentinel', [ ]);
68
            $driver = Arr::pull($config, 'client', 'predis');
69
70
            return new RedisSentinelManager(new $class($driver, $config));
71
        });
72
73
        if ($this->shouldRebindHorizonRedisFactory()) {
74
            $this->rebindHorizonRedisFactory();

src/RedisSentinelServiceProvider.php 1 location

@@ 85-91 (lines=7) @@
82
    */
83
   protected function registerServices()
84
   {
85
        $this->app->singleton('redis-sentinel', function ($app) {
86
            $class = $this->config->getVersionedRedisSentinelManagerClass();
87
            $config = $this->config->get('database.redis-sentinel', [ ]);
88
            $driver = Arr::pull($config, 'client', 'predis');
89
90
            return new RedisSentinelManager(new $class($driver, $config));
91
        });
92
93
        $this->app->singleton('redis-sentinel.manager', function ($app) {
94
            return $app->make('redis-sentinel')->getVersionedManager();