Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/Helper.php 1 location

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

src/voku/db/DB.php 1 location

@@ 1040-1050 (lines=11) @@
1037
      $return = $result->fetchAllArray();
1038
1039
      // save into the cache
1040
      if (
1041
          $cacheKey !== null
1042
          &&
1043
          $useCache === true
1044
          &&
1045
          $cache instanceof Cache
1046
          &&
1047
          $cache->getCacheIsReady() === true
1048
      ) {
1049
        $cache->setItem($cacheKey, $return, $cacheTTL);
1050
      }
1051
1052
    } else {
1053
      $return = $result;