@@ -23,7 +23,7 @@ |
||
23 | 23 | * }, ...); |
24 | 24 | * </code> |
25 | 25 | */ |
26 | - if (! \defined('_')) { |
|
26 | + if (!\defined('_')) { |
|
27 | 27 | \define('_', \RDS\Hydrogen\Collection\HigherOrderCollectionProxy::PATTERN); |
28 | 28 | } |
29 | 29 | } |
@@ -64,6 +64,6 @@ |
||
64 | 64 | */ |
65 | 65 | public function isDesc(): bool |
66 | 66 | { |
67 | - return ! $this->asc; |
|
67 | + return !$this->asc; |
|
68 | 68 | } |
69 | 69 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getScalarResult(Query $query) |
41 | 41 | { |
42 | - return $this->exec($query, function (DoctrineQuery $query) { |
|
42 | + return $this->exec($query, function(DoctrineQuery $query) { |
|
43 | 43 | return $query->getSingleScalarResult(); |
44 | 44 | }); |
45 | 45 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | private function applicator(QueryBuilder $builder): \Closure |
95 | 95 | { |
96 | - return function ($response) use ($builder) { |
|
96 | + return function($response) use ($builder) { |
|
97 | 97 | // Send the context (the builder) in case the |
98 | 98 | // answer contains an empty value. |
99 | 99 | if ($response === null) { |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function getResult(Query $query): iterable |
166 | 166 | { |
167 | - return $this->exec($query, function (DoctrineQuery $query) { |
|
167 | + return $this->exec($query, function(DoctrineQuery $query) { |
|
168 | 168 | return $query->getResult(); |
169 | 169 | }); |
170 | 170 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function getArrayResult(Query $query): array |
177 | 177 | { |
178 | - return $this->exec($query, function (DoctrineQuery $query) { |
|
178 | + return $this->exec($query, function(DoctrineQuery $query) { |
|
179 | 179 | return $query->getArrayResult(); |
180 | 180 | }); |
181 | 181 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | foreach ($inner->getCriteria() as $where) { |
33 | 33 | $expression = parent::getDoctrineExpression($where, $builder->expr(), $where->getField()); |
34 | 34 | |
35 | - yield from $this->extractResult($expression, function ($current) use ($expr, $where, $builder) { |
|
35 | + yield from $this->extractResult($expression, function($current) use ($expr, $where, $builder) { |
|
36 | 36 | if ($where->isAnd()) { |
37 | 37 | $expr->add($current); |
38 | 38 | } else { |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $expression = $this->getDoctrineExpression($where, $builder->expr(), $where->getField()); |
32 | 32 | |
33 | - yield from $this->extractResult($expression, function ($expr) use ($where, $builder) { |
|
33 | + yield from $this->extractResult($expression, function($expr) use ($where, $builder) { |
|
34 | 34 | if ($where->isAnd()) { |
35 | 35 | $builder->andWhere($expr); |
36 | 36 | } else { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param Query $query |
86 | 86 | * @return \Generator |
87 | 87 | */ |
88 | - protected function forEach($context, Query $query): \Generator |
|
88 | + protected function forEach ($context, Query $query): \Generator |
|
89 | 89 | { |
90 | 90 | foreach ($query->getCriteria() as $criterion) { |
91 | 91 | $builder = $this->getBuilder($criterion); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | return \iterator_to_array($value); |
63 | 63 | |
64 | 64 | case \is_object($value) && \method_exists($value, '__toString'): |
65 | - return (string)$value; |
|
65 | + return (string) $value; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | return $value; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $field = null; |
103 | 103 | |
104 | - $replacement = function (array $matches) use (&$field) { |
|
104 | + $replacement = function(array $matches) use (&$field) { |
|
105 | 105 | $field = $matches[1] ?: ($matches[2] ?? null); |
106 | 106 | |
107 | 107 | return \str_replace_first($field, '%s', $matches[0]); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | throw new \LogicException($error); |
115 | 115 | } |
116 | 116 | |
117 | - return \array_merge([$wrapper], $this->analyzePrefix((string)$field)); |
|
117 | + return \array_merge([$wrapper], $this->analyzePrefix((string) $field)); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -69,7 +69,7 @@ |
||
69 | 69 | ($this->then)($query); |
70 | 70 | |
71 | 71 | foreach ($query->getCriteria() as $criterion) { |
72 | - if (! $criterion instanceof Where) { |
|
72 | + if (!$criterion instanceof Where) { |
|
73 | 73 | $error = 'Groups allow to specify only Where selections, but %s given'; |
74 | 74 | throw new \LogicException(\sprintf($error, $criterion)); |
75 | 75 | } |