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

@@ 1111-1121 (lines=11) @@
1108
      $return = $result->fetchAllArray();
1109
1110
      // save into the cache
1111
      if (
1112
          $cacheKey !== null
1113
          &&
1114
          $useCache === true
1115
          &&
1116
          $cache instanceof Cache
1117
          &&
1118
          $cache->getCacheIsReady() === true
1119
      ) {
1120
        $cache->setItem($cacheKey, $return, $cacheTTL);
1121
      }
1122
1123
    } else {
1124
      $return = $result;