Code Duplication    Length = 8-8 lines in 3 locations

src/Vortex.php 3 locations

@@ 1936-1943 (lines=8) @@
1933
     * @param array $methods
1934
     * @return \Doctrine\ORM\Query\Expr\Andx
1935
     */
1936
    protected function createConditionsForIntegerCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
1937
    {
1938
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
1939
            throw new \InvalidArgumentException('Invalid expression methods used');
1940
        }
1941
1942
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
1943
    }
1944
1945
    /**
1946
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 1960-1967 (lines=8) @@
1957
     * @return \Doctrine\ORM\Query\Expr\Andx
1958
     * @uses subqueryAnyisExpression
1959
     */
1960
    protected function createConditionsForStringCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
1961
    {
1962
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
1963
            throw new \InvalidArgumentException('Invalid expression methods used');
1964
        }
1965
1966
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
1967
    }
1968
1969
    /**
1970
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 1985-1992 (lines=8) @@
1982
     * @uses subqueryTrueExpression
1983
     * @uses subqueryFalseExpression
1984
     */
1985
    protected function createConditionsForDatetimeSubquery($subquery, $query, $alias, $currentUser, $methods)
1986
    {
1987
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['false', 'true'])) {
1988
            throw new \InvalidArgumentException('Invalid expression methods used');
1989
        }
1990
1991
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
1992
    }
1993
1994
    /**
1995
     * Translates params into where conditions. Null values are handled as you would expect it.