Code Duplication    Length = 16-16 lines in 2 locations

src/idiorm/orm/ORM.php 2 locations

@@ 1490-1505 (lines=16) @@
1487
   *
1488
   * @return $this
1489
   */
1490
  public function _add_having_no_value($column_name, $operator)
1491
  {
1492
    if (is_array($column_name)) {
1493
      $conditions = $column_name;
1494
    } else {
1495
      $conditions = array($column_name);
1496
    }
1497
1498
    $result = $this;
1499
    foreach ($conditions as $column) {
1500
      $column = $this->_quote_identifier($column);
1501
      $result = $result->_add_having("{$column} {$operator}");
1502
    }
1503
1504
    return $result;
1505
  }
1506
1507
  /**
1508
   * Internal method to add a WHERE condition to the query
@@ 1569-1584 (lines=16) @@
1566
   *
1567
   * @return $this
1568
   */
1569
  public function _add_where_no_value($column_name, $operator)
1570
  {
1571
    if (is_array($column_name)) {
1572
      $conditions = $column_name;
1573
    } else {
1574
      $conditions = array($column_name);
1575
    }
1576
1577
    $result = $this;
1578
    foreach ($conditions as $column) {
1579
      $column = $this->_quote_identifier($column);
1580
      $result = $result->_add_where("{$column} {$operator}");
1581
    }
1582
1583
    return $result;
1584
  }
1585
1586
  /**
1587
   * Internal method to add a HAVING or WHERE condition to the query