Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 1 location

@@ 1031-1041 (lines=11) @@
1028
      $return = $result->fetchAllArray();
1029
1030
      // save into the cache
1031
      if (
1032
          $cacheKey !== null
1033
          &&
1034
          $useCache === true
1035
          &&
1036
          $cache instanceof Cache
1037
          &&
1038
          $cache->getCacheIsReady() === true
1039
      ) {
1040
        $cache->setItem($cacheKey, $return, $cacheTTL);
1041
      }
1042
1043
    } else {
1044
      $return = $result;

src/voku/db/Helper.php 1 location

@@ 231-241 (lines=11) @@
228
    $return = $phonetic->phonetic_matches($searchString, $dataToSearchIn);
229
230
    // save into the cache
231
    if (
232
        $cacheKey !== null
233
        &&
234
        $useCache === true
235
        &&
236
        $cache instanceof Cache
237
        &&
238
        $cache->getCacheIsReady() === true
239
    ) {
240
      $cache->setItem($cacheKey, $return, $cacheTTL);
241
    }
242
243
    return $return;
244
  }