Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/Helper.php 1 location

@@ 171-181 (lines=11) @@
168
    $return = $phonetic->phonetic_matches($searchString, $dataToSearchIn);
169
170
    // save into the cache
171
    if (
172
        $cacheKey !== null
173
        &&
174
        $useCache === true
175
        &&
176
        $cache instanceof Cache
177
        &&
178
        $cache->getCacheIsReady() === true
179
    ) {
180
      $cache->setItem($cacheKey, $return, $cacheTTL);
181
    }
182
183
    return $return;
184
  }

src/voku/db/DB.php 1 location

@@ 1012-1022 (lines=11) @@
1009
      $return = $result->fetchAllArray();
1010
1011
      // save into the cache
1012
      if (
1013
          $cacheKey !== null
1014
          &&
1015
          $useCache === true
1016
          &&
1017
          $cache instanceof Cache
1018
          &&
1019
          $cache->getCacheIsReady() === true
1020
      ) {
1021
        $cache->setItem($cacheKey, $return, $cacheTTL);
1022
      }
1023
1024
    } else {
1025
      $return = $result;