Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/Helper.php 1 location

@@ 267-277 (lines=11) @@
264
        $return = $phonetic->phonetic_matches($searchString, $dataToSearchIn);
265
266
        // save into the cache
267
        if (
268
            $cacheKey !== null
269
            &&
270
            $useCache
271
            &&
272
            $cache instanceof Cache
273
            &&
274
            $cache->getCacheIsReady()
275
        ) {
276
            $cache->setItem($cacheKey, $return, $cacheTTL);
277
        }
278
279
        return $return;
280
    }

src/voku/db/DB.php 1 location

@@ 1165-1175 (lines=11) @@
1162
            $return = $result->fetchAllArray();
1163
1164
            // save into the cache
1165
            if (
1166
                $cacheKey !== null
1167
                &&
1168
                $useCache
1169
                &&
1170
                $cache instanceof Cache
1171
                &&
1172
                $cache->getCacheIsReady()
1173
            ) {
1174
                $cache->setItem($cacheKey, $return, $cacheTTL);
1175
            }
1176
        } else {
1177
            $return = $result;
1178
        }