@@ -52,7 +52,7 @@ |
||
52 | 52 | $compositeExpr = $this->createComposite($queryBuilder); |
53 | 53 | $compositeExpr->addMultiple($parts['where']->getParts()); |
54 | 54 | |
55 | - if (!isset($criteria['where']) || WhereType::AND === $criteria['where']) { |
|
55 | + if (!isset($criteria['where']) || WhereType:: AND === $criteria['where']) { |
|
56 | 56 | $queryBuilder->andWhere($compositeExpr); |
57 | 57 | } else { |
58 | 58 | $queryBuilder->orWhere($compositeExpr); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $paramName = $this->createParamName($queryAlias); |
49 | 49 | |
50 | 50 | $expression = $this->createExpression($queryBuilder->expr(), $fieldName, $paramName, $queryAlias); |
51 | - if (!isset($criteria['where']) || WhereType::AND === $criteria['where']) { |
|
51 | + if (!isset($criteria['where']) || WhereType:: AND === $criteria['where']) { |
|
52 | 52 | $queryBuilder->andWhere($expression); |
53 | 53 | } else { |
54 | 54 | $queryBuilder->orWhere($expression); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | { |
144 | 144 | return [ |
145 | 145 | [null], |
146 | - [WhereType::AND], |
|
146 | + [WhereType:: AND ], |
|
147 | 147 | ]; |
148 | 148 | } |
149 | 149 | } |
@@ -100,7 +100,7 @@ |
||
100 | 100 | ->method('__toString') |
101 | 101 | ->willReturn($expressionString); |
102 | 102 | |
103 | - $methodName = (!isset($criteria['where']) || WhereType::AND === $criteria['where']) |
|
103 | + $methodName = (!isset($criteria['where']) || WhereType:: AND === $criteria['where']) |
|
104 | 104 | ? 'andWhere' |
105 | 105 | : 'orWhere'; |
106 | 106 |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $isBetween |
146 | 146 | ); |
147 | 147 | |
148 | - if (empty($criteria['where']) || WhereType::AND === $criteria['where']) { |
|
148 | + if (empty($criteria['where']) || WhereType:: AND === $criteria['where']) { |
|
149 | 149 | $this->queryBuilder->expects($this->once()) |
150 | 150 | ->method('andWhere') |
151 | 151 | ->with($isBetween); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | [ |
193 | 193 | 'to' => '2021-01-01 00:00:00', |
194 | 194 | 'from' => '2021-02-01 00:00:00', |
195 | - 'where' => WhereType::AND, |
|
195 | + 'where' => WhereType:: AND , |
|
196 | 196 | ], |
197 | 197 | ], |
198 | 198 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | [ |
201 | 201 | 'to' => '2021-01-01 00:00:00', |
202 | 202 | 'from' => '2021-02-01 00:00:00', |
203 | - 'where' => WhereType::OR, |
|
203 | + 'where' => WhereType:: OR , |
|
204 | 204 | ], |
205 | 205 | ], |
206 | 206 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | if (is_string($conditions)) { |
60 | 60 | $condition = $conditions; |
61 | 61 | } elseif (is_object($conditions)) { |
62 | - $condition = (string)$conditions; |
|
62 | + $condition = (string) $conditions; |
|
63 | 63 | } elseif (is_array($conditions) && !empty($conditions)) { |
64 | 64 | $tempQueryBuilder = $queryBuilder->createQueryBuilder(); |
65 | 65 |
@@ -22,6 +22,6 @@ |
||
22 | 22 | */ |
23 | 23 | protected function createExpression(Expr $expr, string $fieldName, string $parameterName, string $alias): string |
24 | 24 | { |
25 | - return (string)$expr->eq($alias . '.' . $fieldName, ':' . $parameterName); |
|
25 | + return (string) $expr->eq($alias . '.' . $fieldName, ':' . $parameterName); |
|
26 | 26 | } |
27 | 27 | } |
@@ -22,6 +22,6 @@ |
||
22 | 22 | */ |
23 | 23 | protected function createExpression(Expr $expr, string $fieldName, string $parameterName, string $alias): string |
24 | 24 | { |
25 | - return (string)$expr->notLike($alias . '.' . $fieldName, ':' . $parameterName); |
|
25 | + return (string) $expr->notLike($alias . '.' . $fieldName, ':' . $parameterName); |
|
26 | 26 | } |
27 | 27 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $fieldName, |
36 | 36 | $alias, |
37 | 37 | $joinType, |
38 | - isset($condition) ? (string)$condition : null, |
|
38 | + isset($condition) ? (string) $condition : null, |
|
39 | 39 | $indexBy |
40 | 40 | ); |
41 | 41 | } |