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

@@ 1157-1170 (lines=14) @@
1154
            $db = self::getInstance();
1155
        }
1156
1157
        if ($useCache) {
1158
            $cache = new Cache(null, null, false, $useCache);
1159
            $cacheKey = 'sql-' . \md5($query);
1160
1161
            if (
1162
                $cache->getCacheIsReady()
1163
                &&
1164
                $cache->existsItem($cacheKey)
1165
            ) {
1166
                return $cache->getItem($cacheKey);
1167
            }
1168
        } else {
1169
            $cache = false;
1170
        }
1171
1172
        $result = $db->query($query);
1173