Code Duplication    Length = 8-8 lines in 3 locations

src/Vortex.php 3 locations

@@ 2106-2113 (lines=8) @@
2103
     * @param array $methods
2104
     * @return \Doctrine\ORM\Query\Expr\Andx
2105
     */
2106
    protected function createConditionsForIntegerCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
2107
    {
2108
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
2109
            throw new \InvalidArgumentException('Invalid expression methods used');
2110
        }
2111
2112
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
2113
    }
2114
2115
    /**
2116
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 2130-2137 (lines=8) @@
2127
     * @return \Doctrine\ORM\Query\Expr\Andx
2128
     * @uses subqueryAnyisExpression
2129
     */
2130
    protected function createConditionsForStringCollectionSubquery($subquery, $query, $alias, $currentUser, $methods)
2131
    {
2132
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['anyis'])) {
2133
            throw new \InvalidArgumentException('Invalid expression methods used');
2134
        }
2135
2136
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
2137
    }
2138
2139
    /**
2140
     * Translates params into where conditions. The subquery must really return an integer for it to work!
@@ 2155-2162 (lines=8) @@
2152
     * @uses subqueryTrueExpression
2153
     * @uses subqueryFalseExpression
2154
     */
2155
    protected function createConditionsForDatetimeSubquery($subquery, $query, $alias, $currentUser, $methods)
2156
    {
2157
        if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['false', 'true'])) {
2158
            throw new \InvalidArgumentException('Invalid expression methods used');
2159
        }
2160
2161
        return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods);
2162
    }
2163
2164
    /**
2165
     * Translates params into where conditions. Null values are handled as you would expect it.