Code Duplication    Length = 15-15 lines in 2 locations

src/voku/db/Helper.php 1 location

@@ 137-151 (lines=15) @@
134
      ' . $whereSQL . '
135
    ';
136
137
    if ($useCache === true) {
138
      $cache = new Cache(null, null, false, $useCache);
139
      $cacheKey = 'sql-phonetic-search-' . md5($query);
140
141
      if (
142
          $cache->getCacheIsReady() === true
143
          &&
144
          $cache->existsItem($cacheKey)
145
      ) {
146
        return $cache->getItem($cacheKey);
147
      }
148
149
    } else {
150
      $cache = false;
151
    }
152
153
    $result = $dbConnection->query($query);
154

src/voku/db/DB.php 1 location

@@ 883-897 (lines=15) @@
880
    $cacheKey = null;
881
    $db = self::getInstance();
882
883
    if ($useCache === true) {
884
      $cache = new Cache(null, null, false, $useCache);
885
      $cacheKey = 'sql-' . md5($query);
886
887
      if (
888
          $cache->getCacheIsReady() === true
889
          &&
890
          $cache->existsItem($cacheKey)
891
      ) {
892
        return $cache->getItem($cacheKey);
893
      }
894
895
    } else {
896
      $cache = false;
897
    }
898
899
    $result = $db->query($query);
900