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

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