@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\CompositeKeyInheritance; |
6 | 6 |
@@ -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\Tests\Models\Cache; |
6 | 6 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | public function addInfo(AttractionInfo $info) |
91 | 91 | { |
92 | - if (! $this->infos->contains($info)) { |
|
92 | + if ( ! $this->infos->contains($info)) { |
|
93 | 93 | $this->infos->add($info); |
94 | 94 | } |
95 | 95 | } |
@@ -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\Tests\Models\Cache; |
6 | 6 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function addTravel(Travel $item) |
97 | 97 | { |
98 | - if (! $this->travels->contains($item)) { |
|
98 | + if ( ! $this->travels->contains($item)) { |
|
99 | 99 | $this->travels->add($item); |
100 | 100 | } |
101 | 101 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\ManyToManyPersister; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\ManyToManyPersister; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\ManyToManyPersister; |
6 | 6 |
@@ -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\Tests\Models\CMS; |
6 | 6 | |
@@ -39,6 +39,6 @@ discard block |
||
39 | 39 | |
40 | 40 | public function __toString() |
41 | 41 | { |
42 | - return __CLASS__ . '[id=' . $this->id . ']'; |
|
42 | + return __CLASS__.'[id='.$this->id.']'; |
|
43 | 43 | } |
44 | 44 | } |
@@ -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\Tests; |
6 | 6 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache()); |
68 | 68 | |
69 | - Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php'); |
|
69 | + Annotations\AnnotationRegistry::registerFile(__DIR__.'/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php'); |
|
70 | 70 | |
71 | 71 | return new AnnotationDriver($reader, (array) $paths); |
72 | 72 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL); |
106 | 106 | $config->setMetadataDriverImpl( |
107 | 107 | $config->newDefaultAnnotationDriver([ |
108 | - realpath(__DIR__ . '/Models/Cache'), |
|
108 | + realpath(__DIR__.'/Models/Cache'), |
|
109 | 109 | ]) |
110 | 110 | ); |
111 | 111 |
@@ -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\Tests; |
6 | 6 | |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $conn = static::$sharedConn; |
337 | 337 | |
338 | 338 | // In case test is skipped, tearDown is called, but no setup may have run |
339 | - if (! $conn) { |
|
339 | + if ( ! $conn) { |
|
340 | 340 | return; |
341 | 341 | } |
342 | 342 | |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | } |
411 | 411 | |
412 | 412 | if (isset($this->usedModelSets['directorytree'])) { |
413 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file')); |
|
413 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file')); |
|
414 | 414 | // MySQL doesn't know deferred deletions therefore only executing the second query gives errors. |
415 | 415 | $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); |
416 | 416 | $conn->executeUpdate('DELETE FROM Directory'); |
@@ -503,12 +503,12 @@ discard block |
||
503 | 503 | ) |
504 | 504 | ); |
505 | 505 | |
506 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups')); |
|
507 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group')); |
|
508 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone')); |
|
509 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user')); |
|
510 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address')); |
|
511 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city')); |
|
506 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups')); |
|
507 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group')); |
|
508 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone')); |
|
509 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user')); |
|
510 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address')); |
|
511 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city')); |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | if (isset($this->usedModelSets['vct_onetoone'])) { |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | $classes = []; |
623 | 623 | |
624 | 624 | foreach ($classNames as $className) { |
625 | - if (! isset(static::$entityTablesCreated[$className])) { |
|
625 | + if ( ! isset(static::$entityTablesCreated[$className])) { |
|
626 | 626 | static::$entityTablesCreated[$className] = true; |
627 | 627 | $classes[] = $this->em->getClassMetadata($className); |
628 | 628 | } |
@@ -643,25 +643,25 @@ discard block |
||
643 | 643 | { |
644 | 644 | $this->setUpDBALTypes(); |
645 | 645 | |
646 | - if (! isset(static::$sharedConn)) { |
|
646 | + if ( ! isset(static::$sharedConn)) { |
|
647 | 647 | static::$sharedConn = TestUtil::getConnection(); |
648 | 648 | } |
649 | 649 | |
650 | 650 | if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) { |
651 | 651 | if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) { |
652 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/'); |
|
652 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/'); |
|
653 | 653 | } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') { |
654 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual'); |
|
654 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual'); |
|
655 | 655 | } |
656 | 656 | } |
657 | 657 | |
658 | - if (! $this->em) { |
|
658 | + if ( ! $this->em) { |
|
659 | 659 | $this->em = $this->getEntityManager(); |
660 | 660 | $this->schemaTool = new SchemaTool($this->em); |
661 | 661 | } |
662 | 662 | |
663 | 663 | foreach ($this->usedModelSets as $setName => $bool) { |
664 | - if (! isset(static::$tablesCreated[$setName])) { |
|
664 | + if ( ! isset(static::$tablesCreated[$setName])) { |
|
665 | 665 | $this->setUpEntitySchema(static::$modelSets[$setName]); |
666 | 666 | |
667 | 667 | static::$tablesCreated[$setName] = true; |
@@ -736,8 +736,8 @@ discard block |
||
736 | 736 | |
737 | 737 | $config->setMetadataDriverImpl( |
738 | 738 | $mappingDriver ?? $config->newDefaultAnnotationDriver([ |
739 | - realpath(__DIR__ . '/Models/Cache'), |
|
740 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
739 | + realpath(__DIR__.'/Models/Cache'), |
|
740 | + realpath(__DIR__.'/Models/GeoNames'), |
|
741 | 741 | ]) |
742 | 742 | ); |
743 | 743 | |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | $query['params'] ?: [] |
796 | 796 | ); |
797 | 797 | |
798 | - $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL; |
|
798 | + $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL; |
|
799 | 799 | } |
800 | 800 | |
801 | 801 | $trace = $e->getTrace(); |
@@ -808,13 +808,13 @@ discard block |
||
808 | 808 | break; |
809 | 809 | } |
810 | 810 | |
811 | - $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL; |
|
811 | + $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL; |
|
812 | 812 | } |
813 | 813 | } |
814 | 814 | |
815 | - $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg; |
|
815 | + $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg; |
|
816 | 816 | |
817 | - throw new \Exception($message, (int)$e->getCode(), $e); |
|
817 | + throw new \Exception($message, (int) $e->getCode(), $e); |
|
818 | 818 | } |
819 | 819 | |
820 | 820 | throw $e; |