Code Duplication    Length = 11-11 lines in 2 locations

src/MultiLang/MultiLang.php 1 location

@@ 115-125 (lines=11) @@
112
     *
113
     * @return \Illuminate\Contracts\Cache\Repository
114
     */
115
    public function getCache()
116
    {
117
        if ($this->config->get('cache.enabled', true) === false) {
118
            return null;
119
        }
120
        $store = $this->config->get('cache.store', 'default');
121
        if ($store == 'default') {
122
            return $this->cache->store();
123
        }
124
        return $this->cache->store($store);
125
    }
126
127
    /**
128
     * Get a database connection instance.

src/MultiLang/Repository.php 1 location

@@ 108-118 (lines=11) @@
105
     *
106
     * @return \Illuminate\Contracts\Cache\Repository
107
     */
108
    public function getCache()
109
    {
110
        if ($this->config->get('cache.enabled', true) === false) {
111
            return null;
112
        }
113
        $store = $this->config->get('cache.store', 'default');
114
        if ($store == 'default') {
115
            return $this->cache->store();
116
        }
117
        return $this->cache->store($store);
118
    }
119
120
121
    public function save($texts)