Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 1 location

@@ 1121-1131 (lines=11) @@
1118
            $return = $result->fetchAllArray();
1119
1120
            // save into the cache
1121
            if (
1122
                $cacheKey !== null
1123
                &&
1124
                $useCache
1125
                &&
1126
                $cache instanceof Cache
1127
                &&
1128
                $cache->getCacheIsReady()
1129
            ) {
1130
                $cache->setItem($cacheKey, $return, $cacheTTL);
1131
            }
1132
        } else {
1133
            $return = $result;
1134
        }

src/voku/db/Helper.php 1 location

@@ 249-259 (lines=11) @@
246
        $return = $phonetic->phonetic_matches($searchString, $dataToSearchIn);
247
248
        // save into the cache
249
        if (
250
            $cacheKey !== null
251
            &&
252
            $useCache
253
            &&
254
            $cache instanceof Cache
255
            &&
256
            $cache->getCacheIsReady()
257
        ) {
258
            $cache->setItem($cacheKey, $return, $cacheTTL);
259
        }
260
261
        return $return;
262
    }