Code Duplication    Length = 8-8 lines in 3 locations

src/Vortex.php 3 locations

@@ 1643-1650 (lines=8) @@
1640
     * @param array $methods
1641
     * @return \Doctrine\ORM\Query\Expr\Andx
1642
     */
1643
    protected function createConditionsForIntegerCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
1644
    {
1645
        if (UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
1646
            throw new InvalidArgumentException('Invalid expression methods used');
1647
        }
1648
1649
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
1650
    }
1651
1652
    /**
1653
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 1665-1672 (lines=8) @@
1662
     * @param array $methods
1663
     * @return \Doctrine\ORM\Query\Expr\Andx
1664
     */
1665
    protected function createConditionsForStringCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
1666
    {
1667
        if (UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
1668
            throw new InvalidArgumentException('Invalid expression methods used');
1669
        }
1670
1671
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
1672
    }
1673
1674
    /**
1675
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 1687-1694 (lines=8) @@
1684
     * @param array $methods
1685
     * @return \Doctrine\ORM\Query\Expr\Andx
1686
     */
1687
    protected function createConditionsForDatetimeSubquery($subquery, $query, $alias, $currentUser, $methods)
1688
    {
1689
        if (UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['false', 'true'])) {
1690
            throw new InvalidArgumentException('Invalid expression methods used');
1691
        }
1692
1693
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
1694
    }
1695
1696
    /**
1697
     * Translates params into where conditions. Null values are handled as you would expect it.