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

@@ 989-1003 (lines=15) @@
986
      $db = self::getInstance();
987
    }
988
989
    if ($useCache === true) {
990
      $cache = new Cache(null, null, false, $useCache);
991
      $cacheKey = 'sql-' . md5($query);
992
993
      if (
994
          $cache->getCacheIsReady() === true
995
          &&
996
          $cache->existsItem($cacheKey)
997
      ) {
998
        return $cache->getItem($cacheKey);
999
      }
1000
1001
    } else {
1002
      $cache = false;
1003
    }
1004
1005
    $result = $db->query($query);
1006