Code Duplication    Length = 14-14 lines in 2 locations

src/voku/db/Helper.php 1 location

@@ 227-240 (lines=14) @@
224
          ' . $whereSQL . '
225
        ';
226
227
        if ($useCache) {
228
            $cache = new \voku\cache\Cache(null, null, false, $useCache);
229
            $cacheKey = 'sql-phonetic-search-' . \md5($query);
230
231
            if (
232
                $cache->getCacheIsReady()
233
                &&
234
                $cache->existsItem($cacheKey)
235
            ) {
236
                return $cache->getItem($cacheKey);
237
            }
238
        } else {
239
            $cache = false;
240
        }
241
242
        $result = $dbConnection->query($query);
243

src/voku/db/DB.php 1 location

@@ 1145-1158 (lines=14) @@
1142
            $db = self::getInstance();
1143
        }
1144
1145
        if ($useCache) {
1146
            $cache = new \voku\cache\Cache(null, null, false, $useCache);
1147
            $cacheKey = 'sql-' . \md5($query);
1148
1149
            if (
1150
                $cache->getCacheIsReady()
1151
                &&
1152
                $cache->existsItem($cacheKey)
1153
            ) {
1154
                return $cache->getItem($cacheKey);
1155
            }
1156
        } else {
1157
            $cache = false;
1158
        }
1159
1160
        $result = $db->query($query);
1161