Code Duplication    Length = 11-11 lines in 2 locations

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
  }

src/voku/db/DB.php 1 location

@@ 1135-1145 (lines=11) @@
1132
      $return = $result->fetchAllArray();
1133
1134
      // save into the cache
1135
      if (
1136
          $cacheKey !== null
1137
          &&
1138
          $useCache === true
1139
          &&
1140
          $cache instanceof Cache
1141
          &&
1142
          $cache->getCacheIsReady() === true
1143
      ) {
1144
        $cache->setItem($cacheKey, $return, $cacheTTL);
1145
      }
1146
1147
    } else {
1148
      $return = $result;