Code Duplication    Length = 8-8 lines in 3 locations

src/Vortex.php 3 locations

@@ 2118-2125 (lines=8) @@
2115
     * @param array $methods
2116
     * @return \Doctrine\ORM\Query\Expr\Andx
2117
     */
2118
    protected function createConditionsForIntegerCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
2119
    {
2120
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
2121
            throw new \InvalidArgumentException('Invalid expression methods used');
2122
        }
2123
2124
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
2125
    }
2126
2127
    /**
2128
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 2142-2149 (lines=8) @@
2139
     * @return \Doctrine\ORM\Query\Expr\Andx
2140
     * @uses subqueryAnyisExpression
2141
     */
2142
    protected function createConditionsForStringCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
2143
    {
2144
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
2145
            throw new \InvalidArgumentException('Invalid expression methods used');
2146
        }
2147
2148
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
2149
    }
2150
2151
    /**
2152
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 2167-2174 (lines=8) @@
2164
     * @uses subqueryTrueExpression
2165
     * @uses subqueryFalseExpression
2166
     */
2167
    protected function createConditionsForDatetimeSubquery($subquery, $query, $alias, $currentUser, $methods)
2168
    {
2169
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['false', 'true'])) {
2170
            throw new \InvalidArgumentException('Invalid expression methods used');
2171
        }
2172
2173
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
2174
    }
2175
2176
    /**
2177
     * Translates params into where conditions. Null values are handled as you would expect it.