@@ -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\ORM\Query; |
| 6 | 6 | use Doctrine\Tests\OrmTestCase; |
@@ -25,6 +25,10 @@ |
||
| 25 | 25 | $this->em = $this->getTestEntityManager(); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param string $dqlToBeTested |
|
| 30 | + * @param string $sqlToBeConfirmed |
|
| 31 | + */ |
|
| 28 | 32 | public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed) |
| 29 | 33 | { |
| 30 | 34 | try { |
@@ -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\ORM\Query; |
| 6 | 6 | |
@@ -88,6 +88,6 @@ discard block |
||
| 88 | 88 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
| 89 | 89 | { |
| 90 | 90 | // getParameter applies quoting automatically |
| 91 | - return $targetTableAlias . '.id = ' . $this->getParameter('id'); |
|
| 91 | + return $targetTableAlias.'.id = '.$this->getParameter('id'); |
|
| 92 | 92 | } |
| 93 | 93 | } |
@@ -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\ORM\Persisters; |
| 6 | 6 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * <http://www.doctrine-project.org>. |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -declare(strict_types=1); |
|
| 20 | +declare(strict_types = 1); |
|
| 21 | 21 | |
| 22 | 22 | namespace Doctrine\Tests\ORM\Internal; |
| 23 | 23 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $metadata, |
| 92 | 92 | Events::postLoad, |
| 93 | 93 | $entity, |
| 94 | - $this->callback(function (LifecycleEventArgs $args) use ($entityManager, $entity) { |
|
| 94 | + $this->callback(function(LifecycleEventArgs $args) use ($entityManager, $entity) { |
|
| 95 | 95 | return $entity === $args->getEntity() && $entityManager === $args->getObjectManager(); |
| 96 | 96 | }), |
| 97 | 97 | $listenersFlag |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $this->logicalOr($metadata1, $metadata2), |
| 160 | 160 | Events::postLoad, |
| 161 | 161 | $this->logicalOr($entity1, $entity2), |
| 162 | - $this->callback(function (LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) { |
|
| 162 | + $this->callback(function(LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) { |
|
| 163 | 163 | return in_array($args->getEntity(), [$entity1, $entity2], true) |
| 164 | 164 | && $entityManager === $args->getObjectManager(); |
| 165 | 165 | }), |
@@ -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\ORM\Functional\SchemaTool; |
| 6 | 6 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | parent::setUp(); |
| 17 | 17 | |
| 18 | 18 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') { |
| 19 | - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of postgresql.'); |
|
| 19 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of postgresql.'); |
|
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | |
@@ -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\ORM\Functional\SchemaTool; |
| 6 | 6 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | try { |
| 74 | 74 | $this->schemaTool->createSchema($classMetadata); |
| 75 | - } catch(\Exception $e) { |
|
| 75 | + } catch (\Exception $e) { |
|
| 76 | 76 | // was already created |
| 77 | 77 | } |
| 78 | 78 | |
@@ -87,6 +87,6 @@ discard block |
||
| 87 | 87 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
| 88 | 88 | $sql = array_filter($sql, function($sql) { return strpos($sql, 'DROP') === false; }); |
| 89 | 89 | |
| 90 | - self::assertEquals(0, count($sql), "SQL: " . implode(PHP_EOL, $sql)); |
|
| 90 | + self::assertEquals(0, count($sql), "SQL: ".implode(PHP_EOL, $sql)); |
|
| 91 | 91 | } |
| 92 | 92 | } |
@@ -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\ORM\Functional\SchemaTool; |
| 6 | 6 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function testDropPartSchemaWithForeignKeys() |
| 60 | 60 | { |
| 61 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 61 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 62 | 62 | $this->markTestSkipped("Foreign Key test"); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -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\ORM\Functional\SchemaTool; |
| 6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | $updateSql = $this->schemaTool->getUpdateSchemaSql([$class]); |
| 32 | 32 | |
| 33 | - $updateSql = array_filter($updateSql, function ($sql) { |
|
| 33 | + $updateSql = array_filter($updateSql, function($sql) { |
|
| 34 | 34 | return strpos($sql, 'DBAL483') !== false; |
| 35 | 35 | }); |
| 36 | 36 | |
@@ -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\ORM\Functional\SchemaTool; |
| 6 | 6 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | protected function setUp() { |
| 15 | 15 | parent::setUp(); |
| 16 | 16 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') { |
| 17 | - $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mysql.'); |
|
| 17 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of mysql.'); |
|
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | |