@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $this->expectExceptionMessage('Too few parameters: the query defines 1 parameters but you only bound 0'); |
152 | 152 | |
153 | 153 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1') |
154 | - ->getSingleResult(); |
|
154 | + ->getSingleResult(); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | public function testInvalidInputParameterThrowsException() : void |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | $this->expectException(QueryException::class); |
160 | 160 | |
161 | 161 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?') |
162 | - ->setParameter(1, 'jwage') |
|
163 | - ->getSingleResult(); |
|
162 | + ->setParameter(1, 'jwage') |
|
163 | + ->getSingleResult(); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | public function testSetParameters() : void |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | $parameters->add(new Parameter(2, 'active')); |
171 | 171 | |
172 | 172 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
173 | - ->setParameters($parameters) |
|
174 | - ->getResult(); |
|
173 | + ->setParameters($parameters) |
|
174 | + ->getResult(); |
|
175 | 175 | |
176 | 176 | $extractValue = static function (Parameter $parameter) { |
177 | 177 | return $parameter->getValue(); |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | $parameters = [1 => 'jwage', 2 => 'active']; |
189 | 189 | |
190 | 190 | $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u WHERE u.name = ?1 AND u.status = ?2') |
191 | - ->setParameters($parameters) |
|
192 | - ->getResult(); |
|
191 | + ->setParameters($parameters) |
|
192 | + ->getResult(); |
|
193 | 193 | |
194 | 194 | self::assertSame( |
195 | 195 | array_values($parameters), |
@@ -329,14 +329,14 @@ discard block |
||
329 | 329 | { |
330 | 330 | $this->expectException(NoResultException::class); |
331 | 331 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
332 | - ->getSingleResult(); |
|
332 | + ->getSingleResult(); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | public function testGetSingleScalarResultThrowsExceptionOnNoResult() : void |
336 | 336 | { |
337 | 337 | $this->expectException(NoResultException::class); |
338 | 338 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
339 | - ->getSingleScalarResult(); |
|
339 | + ->getSingleScalarResult(); |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | public function testGetSingleScalarResultThrowsExceptionOnNonUniqueResult() : void |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | $this->em->clear(); |
366 | 366 | |
367 | 367 | $this->em->createQuery('select a from Doctrine\Tests\Models\CMS\CmsArticle a') |
368 | - ->getSingleScalarResult(); |
|
368 | + ->getSingleScalarResult(); |
|
369 | 369 | } |
370 | 370 | |
371 | 371 | public function testModifiedLimitQuery() : void |
@@ -382,27 +382,27 @@ discard block |
||
382 | 382 | $this->em->clear(); |
383 | 383 | |
384 | 384 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
385 | - ->setFirstResult(1) |
|
386 | - ->setMaxResults(2) |
|
387 | - ->getResult(); |
|
385 | + ->setFirstResult(1) |
|
386 | + ->setMaxResults(2) |
|
387 | + ->getResult(); |
|
388 | 388 | |
389 | 389 | self::assertCount(2, $data); |
390 | 390 | self::assertEquals('gblanco1', $data[0]->username); |
391 | 391 | self::assertEquals('gblanco2', $data[1]->username); |
392 | 392 | |
393 | 393 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
394 | - ->setFirstResult(3) |
|
395 | - ->setMaxResults(2) |
|
396 | - ->getResult(); |
|
394 | + ->setFirstResult(3) |
|
395 | + ->setMaxResults(2) |
|
396 | + ->getResult(); |
|
397 | 397 | |
398 | 398 | self::assertCount(2, $data); |
399 | 399 | self::assertEquals('gblanco3', $data[0]->username); |
400 | 400 | self::assertEquals('gblanco4', $data[1]->username); |
401 | 401 | |
402 | 402 | $data = $this->em->createQuery('SELECT u FROM ' . CmsUser::class . ' u') |
403 | - ->setFirstResult(3) |
|
404 | - ->setMaxResults(2) |
|
405 | - ->getScalarResult(); |
|
403 | + ->setFirstResult(3) |
|
404 | + ->setMaxResults(2) |
|
405 | + ->getScalarResult(); |
|
406 | 406 | } |
407 | 407 | |
408 | 408 | /** |
@@ -613,9 +613,9 @@ discard block |
||
613 | 613 | { |
614 | 614 | $qb = $this->em->createQueryBuilder(); |
615 | 615 | $qb->select('u') |
616 | - ->from(CmsUser::class, 'u') |
|
617 | - ->innerJoin('u.articles', 'a') |
|
618 | - ->where('(u.id = 0) OR (u.id IS NULL)'); |
|
616 | + ->from(CmsUser::class, 'u') |
|
617 | + ->innerJoin('u.articles', 'a') |
|
618 | + ->where('(u.id = 0) OR (u.id IS NULL)'); |
|
619 | 619 | |
620 | 620 | $query = $qb->getQuery(); |
621 | 621 | $users = $query->execute(); |
@@ -288,14 +288,14 @@ discard block |
||
288 | 288 | { |
289 | 289 | $this->expectException(InvalidMagicMethodCall::class); |
290 | 290 | $this->em->getRepository(CmsUser::class) |
291 | - ->findByStatus(); |
|
291 | + ->findByStatus(); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | public function testExceptionIsThrownWhenUsingInvalidFieldName() : void |
295 | 295 | { |
296 | 296 | $this->expectException(InvalidMagicMethodCall::class); |
297 | 297 | $this->em->getRepository(CmsUser::class) |
298 | - ->findByThisFieldDoesNotExist('testvalue'); |
|
298 | + ->findByThisFieldDoesNotExist('testvalue'); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $this->expectException(TransactionRequiredException::class); |
308 | 308 | |
309 | 309 | $this->em->getRepository(CmsUser::class) |
310 | - ->find(1, LockMode::PESSIMISTIC_READ); |
|
310 | + ->find(1, LockMode::PESSIMISTIC_READ); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $this->expectException(TransactionRequiredException::class); |
320 | 320 | |
321 | 321 | $this->em->getRepository(CmsUser::class) |
322 | - ->find(1, LockMode::PESSIMISTIC_WRITE); |
|
322 | + ->find(1, LockMode::PESSIMISTIC_WRITE); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $this->expectException(OptimisticLockException::class); |
332 | 332 | |
333 | 333 | $this->em->getRepository(CmsUser::class) |
334 | - ->find(1, LockMode::OPTIMISTIC); |
|
334 | + ->find(1, LockMode::OPTIMISTIC); |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | /** |