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

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