Code Duplication    Length = 16-16 lines in 2 locations

src/idiorm/orm/ORM.php 2 locations

@@ 1470-1485 (lines=16) @@
1467
   *
1468
   * @return ORM
1469
   */
1470
  public function _add_having_no_value($column_name, $operator)
1471
  {
1472
    if (is_array($column_name)) {
1473
      $conditions = $column_name;
1474
    } else {
1475
      $conditions = array($column_name);
1476
    }
1477
1478
    $result = $this;
1479
    foreach ($conditions as $column) {
1480
      $column = $this->_quote_identifier($column);
1481
      $result = $result->_add_having("{$column} {$operator}");
1482
    }
1483
1484
    return $result;
1485
  }
1486
1487
  /**
1488
   * Internal method to add a WHERE condition to the query
@@ 1549-1564 (lines=16) @@
1546
   *
1547
   * @return ORM
1548
   */
1549
  public function _add_where_no_value($column_name, $operator)
1550
  {
1551
    if (is_array($column_name)) {
1552
      $conditions = $column_name;
1553
    } else {
1554
      $conditions = array($column_name);
1555
    }
1556
1557
    $result = $this;
1558
    foreach ($conditions as $column) {
1559
      $column = $this->_quote_identifier($column);
1560
      $result = $result->_add_where("{$column} {$operator}");
1561
    }
1562
1563
    return $result;
1564
  }
1565
1566
  /**
1567
   * Internal method to add a HAVING or WHERE condition to the query