@@ -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->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 | } |
@@ -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->like($alias . '.' . $fieldName, ':' . $parameterName); |
|
| 25 | + return (string) $expr->like($alias . '.' . $fieldName, ':' . $parameterName); |
|
| 26 | 26 | } |
| 27 | 27 | } |
@@ -57,14 +57,14 @@ |
||
| 57 | 57 | switch ($type) { |
| 58 | 58 | case 'integer': |
| 59 | 59 | case 'smallint': |
| 60 | - return (int)$value; |
|
| 60 | + return (int) $value; |
|
| 61 | 61 | case 'boolean': |
| 62 | - return (bool)$value; |
|
| 62 | + return (bool) $value; |
|
| 63 | 63 | case 'decimal': |
| 64 | 64 | case 'float': |
| 65 | - return (float)$value; |
|
| 65 | + return (float) $value; |
|
| 66 | 66 | case 'string': |
| 67 | - return (string)$value; |
|
| 67 | + return (string) $value; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $castDates = !isset($options['cast_dates']) || $options['cast_dates']; |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | ':' . $toParamName |
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | - if (!isset($criteria['where']) || WhereType::AND === $criteria['where']) { |
|
| 53 | + if (!isset($criteria['where']) || WhereType:: AND === $criteria['where']) { |
|
| 54 | 54 | $queryBuilder->andWhere($expression); |
| 55 | 55 | } else { |
| 56 | 56 | $queryBuilder->orWhere($expression); |