@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM; |
| 6 | 6 | |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | { |
| 285 | 285 | $query = new Query($this); |
| 286 | 286 | |
| 287 | - if (! empty($dql)) { |
|
| 287 | + if ( ! empty($dql)) { |
|
| 288 | 288 | $query->setDQL($dql); |
| 289 | 289 | } |
| 290 | 290 | |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
| 375 | 375 | $className = $class->getClassName(); |
| 376 | 376 | |
| 377 | - if (! is_array($id)) { |
|
| 377 | + if ( ! is_array($id)) { |
|
| 378 | 378 | if ($class->isIdentifierComposite()) { |
| 379 | 379 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
| 380 | 380 | } |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | $sortedId = []; |
| 396 | 396 | |
| 397 | 397 | foreach ($class->identifier as $identifier) { |
| 398 | - if (! isset($id[$identifier])) { |
|
| 398 | + if ( ! isset($id[$identifier])) { |
|
| 399 | 399 | throw ORMException::missingIdentifierField($className, $identifier); |
| 400 | 400 | } |
| 401 | 401 | |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | // Check identity map first |
| 413 | 413 | $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName()); |
| 414 | 414 | if ($entity !== false) { |
| 415 | - if (! ($entity instanceof $className)) { |
|
| 415 | + if ( ! ($entity instanceof $className)) { |
|
| 416 | 416 | return null; |
| 417 | 417 | } |
| 418 | 418 | |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | |
| 437 | 437 | switch (true) { |
| 438 | 438 | case $lockMode === LockMode::OPTIMISTIC: |
| 439 | - if (! $class->isVersioned()) { |
|
| 439 | + if ( ! $class->isVersioned()) { |
|
| 440 | 440 | throw OptimisticLockException::notVersioned($className); |
| 441 | 441 | } |
| 442 | 442 | |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | |
| 449 | 449 | case $lockMode === LockMode::PESSIMISTIC_READ: |
| 450 | 450 | case $lockMode === LockMode::PESSIMISTIC_WRITE: |
| 451 | - if (! $this->getConnection()->isTransactionActive()) { |
|
| 451 | + if ( ! $this->getConnection()->isTransactionActive()) { |
|
| 452 | 452 | throw TransactionRequiredException::transactionRequired(); |
| 453 | 453 | } |
| 454 | 454 | |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
| 468 | 468 | $className = $class->getClassName(); |
| 469 | 469 | |
| 470 | - if (! is_array($id)) { |
|
| 470 | + if ( ! is_array($id)) { |
|
| 471 | 471 | if ($class->isIdentifierComposite()) { |
| 472 | 472 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
| 473 | 473 | } |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | $sortedId = []; |
| 493 | 493 | |
| 494 | 494 | foreach ($class->identifier as $identifier) { |
| 495 | - if (! isset($scalarId[$identifier])) { |
|
| 495 | + if ( ! isset($scalarId[$identifier])) { |
|
| 496 | 496 | throw ORMException::missingIdentifierField($className, $identifier); |
| 497 | 497 | } |
| 498 | 498 | |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
| 534 | 534 | $className = $class->getClassName(); |
| 535 | 535 | |
| 536 | - if (! is_array($id)) { |
|
| 536 | + if ( ! is_array($id)) { |
|
| 537 | 537 | if ($class->isIdentifierComposite()) { |
| 538 | 538 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
| 539 | 539 | } |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | $sortedId = []; |
| 555 | 555 | |
| 556 | 556 | foreach ($class->identifier as $identifier) { |
| 557 | - if (! isset($id[$identifier])) { |
|
| 557 | + if ( ! isset($id[$identifier])) { |
|
| 558 | 558 | throw ORMException::missingIdentifierField($className, $identifier); |
| 559 | 559 | } |
| 560 | 560 | |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | */ |
| 628 | 628 | public function persist($entity) |
| 629 | 629 | { |
| 630 | - if (! is_object($entity)) { |
|
| 630 | + if ( ! is_object($entity)) { |
|
| 631 | 631 | throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity); |
| 632 | 632 | } |
| 633 | 633 | |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | */ |
| 650 | 650 | public function remove($entity) |
| 651 | 651 | { |
| 652 | - if (! is_object($entity)) { |
|
| 652 | + if ( ! is_object($entity)) { |
|
| 653 | 653 | throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity); |
| 654 | 654 | } |
| 655 | 655 | |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | */ |
| 670 | 670 | public function refresh($entity) |
| 671 | 671 | { |
| 672 | - if (! is_object($entity)) { |
|
| 672 | + if ( ! is_object($entity)) { |
|
| 673 | 673 | throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity); |
| 674 | 674 | } |
| 675 | 675 | |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | */ |
| 825 | 825 | public static function create(Connection $connection, Configuration $config, ?EventManager $eventManager = null) |
| 826 | 826 | { |
| 827 | - if (! $config->getMetadataDriverImpl()) { |
|
| 827 | + if ( ! $config->getMetadataDriverImpl()) { |
|
| 828 | 828 | throw ORMException::missingMappingDriverImpl(); |
| 829 | 829 | } |
| 830 | 830 | |