@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | { |
41 | 41 | $this->visitTest( |
42 | 42 | Criteria::property('foo')->eq(10)->andX(Criteria::property('bar')->eq(20)), |
43 | - function () { |
|
43 | + function() { |
|
44 | 44 | return $this->createQueryBuilder() |
45 | 45 | ->field('foo')->equals(10) |
46 | 46 | ->field('bar')->equals(20); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $this->visitTest( |
51 | 51 | Criteria::property('foo')->gt(10)->andX(Criteria::property('foo')->lt(20)), |
52 | - function () { |
|
52 | + function() { |
|
53 | 53 | return $this->createQueryBuilder() |
54 | 54 | ->field('foo')->gt(10) |
55 | 55 | ->field('foo')->lt(20); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | Criteria::property('foo')->lt(20)->orX(Criteria::property('bar')->lt(20)), |
62 | 62 | Criteria::property('foo')->gt(10)->orX(Criteria::property('foo')->lt(25)) |
63 | 63 | ), |
64 | - function () { |
|
64 | + function() { |
|
65 | 65 | $qb = $this->createQueryBuilder(); |
66 | 66 | |
67 | 67 | return $qb |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | { |
83 | 83 | $this->visitTest( |
84 | 84 | Criteria::property('foo')->eq(10)->orX(Criteria::property('bar')->eq(20)), |
85 | - function () { |
|
85 | + function() { |
|
86 | 86 | $qb = $this->createQueryBuilder(); |
87 | 87 | |
88 | 88 | return $qb |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function testVisitNot() |
99 | 99 | { |
100 | - $this->visitTest(new NotSpecification(Criteria::property('foo')->eq(10)), function () { |
|
100 | + $this->visitTest(new NotSpecification(Criteria::property('foo')->eq(10)), function() { |
|
101 | 101 | $qb = $this->createQueryBuilder(); |
102 | 102 | |
103 | 103 | return $qb->not($qb->expr()->field('foo')->equals(10)); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function testVisitCallback() |
143 | 143 | { |
144 | - $this->notSupportedOperationTest(Criteria::callback(function () { |
|
144 | + $this->notSupportedOperationTest(Criteria::callback(function() { |
|
145 | 145 | |
146 | 146 | })->selector()); |
147 | 147 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function tesVisittGreaterThan() |
178 | 178 | { |
179 | - $this->visitTest(Criteria::property('foo')->gt(10), function () { |
|
179 | + $this->visitTest(Criteria::property('foo')->gt(10), function() { |
|
180 | 180 | return $this->createQueryBuilder()->field('foo')->gt(10); |
181 | 181 | }); |
182 | 182 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function testVisitGreaterThanEqual() |
188 | 188 | { |
189 | - $this->visitTest(Criteria::property('foo')->gte(10), function () { |
|
189 | + $this->visitTest(Criteria::property('foo')->gte(10), function() { |
|
190 | 190 | return $this->createQueryBuilder()->field('foo')->gte(10); |
191 | 191 | }); |
192 | 192 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function testVisitLessThan() |
198 | 198 | { |
199 | - $this->visitTest(Criteria::property('foo')->lt(10), function () { |
|
199 | + $this->visitTest(Criteria::property('foo')->lt(10), function() { |
|
200 | 200 | return $this->createQueryBuilder()->field('foo')->lt(10); |
201 | 201 | }); |
202 | 202 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function testVisitLessThanEqual() |
208 | 208 | { |
209 | - $this->visitTest(Criteria::property('foo')->lte(10), function () { |
|
209 | + $this->visitTest(Criteria::property('foo')->lte(10), function() { |
|
210 | 210 | return $this->createQueryBuilder()->field('foo')->lte(10); |
211 | 211 | }); |
212 | 212 | } |
@@ -216,26 +216,26 @@ discard block |
||
216 | 216 | */ |
217 | 217 | public function testVisitEqual() |
218 | 218 | { |
219 | - $this->visitTest(Criteria::property('foo')->eq(10), function () { |
|
219 | + $this->visitTest(Criteria::property('foo')->eq(10), function() { |
|
220 | 220 | return $this->createQueryBuilder()->field('foo')->equals(10); |
221 | 221 | }); |
222 | 222 | |
223 | - $this->visitTest(Criteria::property('foo')->count()->eq(10), function () { |
|
223 | + $this->visitTest(Criteria::property('foo')->count()->eq(10), function() { |
|
224 | 224 | return $this->createQueryBuilder()->field('foo')->size(10); |
225 | 225 | }); |
226 | 226 | |
227 | 227 | $user = new User(UserId::next(), 'user', 20); |
228 | 228 | |
229 | - $this->visitTest(Criteria::eq($user), function () use ($user) { |
|
229 | + $this->visitTest(Criteria::eq($user), function() use ($user) { |
|
230 | 230 | return $this->createQueryBuilder()->field('id')->equals($user->id()->toNative()); |
231 | 231 | }); |
232 | 232 | |
233 | - $this->visitTest(Criteria::property('id')->eq($user->id()), function () use ($user) { |
|
233 | + $this->visitTest(Criteria::property('id')->eq($user->id()), function() use ($user) { |
|
234 | 234 | return $this->createQueryBuilder()->field('id')->equals($user->id()->toNative()); |
235 | 235 | }); |
236 | 236 | |
237 | 237 | $this->logicExceptionTest( |
238 | - Criteria::callback(function () { |
|
238 | + Criteria::callback(function() { |
|
239 | 239 | |
240 | 240 | })->eq(10) |
241 | 241 | ); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | public function testVisitNotEqual() |
250 | 250 | { |
251 | - $this->visitTest(Criteria::property('foo')->neq(10), function () { |
|
251 | + $this->visitTest(Criteria::property('foo')->neq(10), function() { |
|
252 | 252 | return $this->createQueryBuilder()->field('foo')->notEqual(10); |
253 | 253 | }); |
254 | 254 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function testVisitSame() |
260 | 260 | { |
261 | - $this->visitTest(Criteria::property('foo')->same(10), function () { |
|
261 | + $this->visitTest(Criteria::property('foo')->same(10), function() { |
|
262 | 262 | return $this->createQueryBuilder()->field('foo')->equals(10); |
263 | 263 | }); |
264 | 264 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function testVisitNotSame() |
270 | 270 | { |
271 | - $this->visitTest(Criteria::property('foo')->notsame(10), function () { |
|
271 | + $this->visitTest(Criteria::property('foo')->notsame(10), function() { |
|
272 | 272 | return $this->createQueryBuilder()->field('foo')->notEqual(10); |
273 | 273 | }); |
274 | 274 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function testVisitAll() |
280 | 280 | { |
281 | - $this->visitTest(Criteria::property('foo')->all(Criteria::property('bar')->gt(10)), function () { |
|
281 | + $this->visitTest(Criteria::property('foo')->all(Criteria::property('bar')->gt(10)), function() { |
|
282 | 282 | $qb = $this->createQueryBuilder(); |
283 | 283 | |
284 | 284 | return $qb->field('foo')->all( |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function testAtLeast() |
296 | 296 | { |
297 | - $this->visitTest(Criteria::property('foo')->any(Criteria::property('bar')->gt(10)), function () { |
|
297 | + $this->visitTest(Criteria::property('foo')->any(Criteria::property('bar')->gt(10)), function() { |
|
298 | 298 | $qb = $this->createQueryBuilder(); |
299 | 299 | |
300 | 300 | return $qb->field('foo') |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | protected function visitFieldTest($field, $expected = null) |
331 | 331 | { |
332 | 332 | $expected = $expected === null && $field instanceof Field ? $field->name() : $expected; |
333 | - $this->visitTest($field, function () use ($expected) { |
|
333 | + $this->visitTest($field, function() use ($expected) { |
|
334 | 334 | return $this->createQueryBuilder()->field($expected)->equals(true); |
335 | 335 | }); |
336 | 336 | } |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $this |
352 | 352 | ->given($qb = $this->createQueryBuilder()) |
353 | 353 | ->given($visitor = $this->createVisitor($qb)) |
354 | - ->exception(function () use ($visitor, $criteria) { |
|
354 | + ->exception(function() use ($visitor, $criteria) { |
|
355 | 355 | $criteria->accept($visitor); |
356 | 356 | }) |
357 | 357 | ->isInstanceOf(\LogicException::class) |
@@ -129,7 +129,7 @@ |
||
129 | 129 | protected function createMetadataDriverImpl() |
130 | 130 | { |
131 | 131 | $prefixs = array( |
132 | - __DIR__.'/mapping' => 'Cubiche\Domain\Repository\Tests\Fixtures', |
|
132 | + __DIR__.'/mapping' => 'Cubiche\Domain\Repository\Tests\Fixtures', |
|
133 | 133 | ); |
134 | 134 | |
135 | 135 | return new SimplifiedXmlDriver($prefixs); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $this->comparatorVisitorFactory = $comparatorVisitorFactory; |
64 | 64 | |
65 | 65 | $this->factory = Delegate::fromClosure( |
66 | - function () use ($dm, $documentName) { |
|
66 | + function() use ($dm, $documentName) { |
|
67 | 67 | return new static($dm, $documentName); |
68 | 68 | } |
69 | 69 | ); |
@@ -274,7 +274,7 @@ |
||
274 | 274 | \array_intersect_key($queryBuilder1->getQueryArray(), $queryBuilder2->getQueryArray()) |
275 | 275 | ); |
276 | 276 | |
277 | - return $intersection->keys()->findOne(Criteria::callback(function ($value) { |
|
277 | + return $intersection->keys()->findOne(Criteria::callback(function($value) { |
|
278 | 278 | return \strpos($value, '$') === 0; |
279 | 279 | })) !== null; |
280 | 280 | } |