@@ -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 | |
@@ -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 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @throws FilterException |
| 48 | 48 | */ |
| 49 | - public function testFilterWillApplyTheProvidedConditions(WhereType|string|null $whereType): void |
|
| 49 | + public function testFilterWillApplyTheProvidedConditions(WhereType | string | null $whereType): void |
|
| 50 | 50 | { |
| 51 | 51 | $criteria = [ |
| 52 | 52 | 'conditions' => [ |
@@ -143,8 +143,8 @@ discard block |
||
| 143 | 143 | { |
| 144 | 144 | return [ |
| 145 | 145 | [null], |
| 146 | - [WhereType::AND], |
|
| 147 | - [WhereType::AND->value], |
|
| 146 | + [WhereType:: AND ], |
|
| 147 | + [WhereType:: AND ->value], |
|
| 148 | 148 | ]; |
| 149 | 149 | } |
| 150 | 150 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | */ |
| 110 | 110 | public function testSortWillApplySortCriteria( |
| 111 | 111 | string $field, |
| 112 | - OrderByDirection|string|null $direction, |
|
| 112 | + OrderByDirection | string | null $direction, |
|
| 113 | 113 | ?string $alias = null |
| 114 | 114 | ): void { |
| 115 | 115 | $sort = new Field(); |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | * @dataProvider getOrderByWillProxyToInternalQueryBuilderData |
| 352 | 352 | */ |
| 353 | 353 | public function testOrderByWillProxyToInternalQueryBuilder( |
| 354 | - Expr\OrderBy|string $sort, |
|
| 354 | + Expr\OrderBy | string $sort, |
|
| 355 | 355 | ?OrderByDirection $direction = null |
| 356 | 356 | ): void { |
| 357 | 357 | $queryBuilder = new QueryBuilder($this->doctrineQueryBuilder); |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | * @dataProvider getOrderByWillProxyToInternalQueryBuilderData |
| 369 | 369 | */ |
| 370 | 370 | public function testAddOrderByWillProxyToInternalQueryBuilder( |
| 371 | - Expr\OrderBy|string $sort, |
|
| 371 | + Expr\OrderBy | string $sort, |
|
| 372 | 372 | ?OrderByDirection $direction = null |
| 373 | 373 | ): void { |
| 374 | 374 | $queryBuilder = new QueryBuilder($this->doctrineQueryBuilder); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | * @throws QueryFilterManagerException |
| 22 | 22 | */ |
| 23 | 23 | public function filter( |
| 24 | - DoctrineQueryBuilder|QueryBuilderInterface $queryBuilder, |
|
| 24 | + DoctrineQueryBuilder | QueryBuilderInterface $queryBuilder, |
|
| 25 | 25 | string $entityName, |
| 26 | 26 | array $criteria |
| 27 | 27 | ): DoctrineQueryBuilder; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @throws QueryFilterManagerException |
| 40 | 40 | */ |
| 41 | 41 | public function filter( |
| 42 | - DoctrineQueryBuilder|QueryBuilderInterface $queryBuilder, |
|
| 42 | + DoctrineQueryBuilder | QueryBuilderInterface $queryBuilder, |
|
| 43 | 43 | string $entityName, |
| 44 | 44 | array $criteria |
| 45 | 45 | ): DoctrineQueryBuilder { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | private function applyFilter( |
| 68 | 68 | QueryBuilderInterface $queryBuilder, |
| 69 | 69 | MetadataInterface $metadata, |
| 70 | - array|FilterInterface $data |
|
| 70 | + array | FilterInterface $data |
|
| 71 | 71 | ): void { |
| 72 | 72 | if ($data instanceof FilterInterface) { |
| 73 | 73 | $filter = $data; |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | private function applySort( |
| 127 | 127 | QueryBuilderInterface $queryBuilder, |
| 128 | 128 | MetadataInterface $metadata, |
| 129 | - array|SortInterface $data |
|
| 129 | + array | SortInterface $data |
|
| 130 | 130 | ): void { |
| 131 | 131 | if ($data instanceof SortInterface) { |
| 132 | 132 | $sort = $data; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - private function getQueryBuilder(QueryBuilderInterface|DoctrineQueryBuilder $queryBuilder): QueryBuilderInterface |
|
| 173 | + private function getQueryBuilder(QueryBuilderInterface | DoctrineQueryBuilder $queryBuilder): QueryBuilderInterface |
|
| 174 | 174 | { |
| 175 | 175 | if ($queryBuilder instanceof DoctrineQueryBuilder) { |
| 176 | 176 | $queryBuilder = new QueryBuilder($queryBuilder, $queryBuilder->getRootAliases()[0] ?? ''); |