Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 1 location

@@ 1143-1153 (lines=11) @@
1140
            $return = $result->fetchAllArray();
1141
1142
            // save into the cache
1143
            if (
1144
                $cacheKey !== null
1145
                &&
1146
                $useCache
1147
                &&
1148
                $cache instanceof Cache
1149
                &&
1150
                $cache->getCacheIsReady()
1151
            ) {
1152
                $cache->setItem($cacheKey, $return, $cacheTTL);
1153
            }
1154
        } else {
1155
            $return = $result;
1156
        }

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
    }