Code Duplication    Length = 14-14 lines in 2 locations

src/voku/db/Helper.php 1 location

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

src/voku/db/DB.php 1 location

@@ 1128-1141 (lines=14) @@
1125
            $db = self::getInstance();
1126
        }
1127
1128
        if ($useCache) {
1129
            $cache = new Cache(null, null, false, $useCache);
1130
            $cacheKey = 'sql-' . \md5($query);
1131
1132
            if (
1133
                $cache->getCacheIsReady()
1134
                &&
1135
                $cache->existsItem($cacheKey)
1136
            ) {
1137
                return $cache->getItem($cacheKey);
1138
            }
1139
        } else {
1140
            $cache = false;
1141
        }
1142
1143
        $result = $db->query($query);
1144