Code Duplication    Length = 7-7 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 526-532 (lines=7) @@
523
  private function _parseQueryParams(string $sql, array $params = []): array
524
  {
525
    // is there anything to parse?
526
    if (
527
        \strpos($sql, '?') === false
528
        ||
529
        \count($params) === 0
530
    ) {
531
      return ['sql' => $sql, 'params' => $params];
532
    }
533
534
    $parseKey = \md5(\uniqid((string)\mt_rand(), true));
535
    $sql = \str_replace('?', $parseKey, $sql);
@@ 810-816 (lines=7) @@
807
  public function _parseQueryParamsByName(string $sql, array $params = []): array
808
  {
809
    // is there anything to parse?
810
    if (
811
        \strpos($sql, ':') === false
812
        ||
813
        \count($params) === 0
814
    ) {
815
      return ['sql' => $sql, 'params' => $params];
816
    }
817
818
    $parseKey = \md5(\uniqid((string)\mt_rand(), true));
819