@@ -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; |
| 6 | 6 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $this->_em->getClassMetadata(OwningSide::class), |
| 21 | 21 | $this->_em->getClassMetadata(InverseSide::class), |
| 22 | 22 | ]); |
| 23 | - } catch(ToolsException $e) { |
|
| 23 | + } catch (ToolsException $e) { |
|
| 24 | 24 | // ignored |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -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\OneToOneInverseSideLoad; |
| 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\OneToOneInverseSideLoad; |
| 6 | 6 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if (isset($AST->orderByClause)) { |
| 96 | 96 | foreach ($AST->orderByClause->orderByItems as $item) { |
| 97 | 97 | if ( ! $item->expression instanceof PathExpression) { |
| 98 | - if(is_string($item->expression) && isset($queryComponents[$item->expression])) { |
|
| 98 | + if (is_string($item->expression) && isset($queryComponents[$item->expression])) { |
|
| 99 | 99 | $qComp = $queryComponents[$item->expression]; |
| 100 | 100 | if (isset($qComp['resultVariable'])) { |
| 101 | 101 | $AST->selectClause->selectExpressions[] = new SelectExpression($qComp['resultVariable'], $item->expression); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $AST->selectClause->selectExpressions[] = new SelectExpression( |
| 107 | 107 | $this->createSelectExpressionItem($item->expression), |
| 108 | - '_dctrn_ord' . $this->_aliasCounter++ |
|
| 108 | + '_dctrn_ord'.$this->_aliasCounter++ |
|
| 109 | 109 | ); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -60,13 +60,13 @@ discard block |
||
| 60 | 60 | $em = $this->createMock(EntityManagerInterface::class); |
| 61 | 61 | |
| 62 | 62 | $mappingDriver->method('getAllClassNames') |
| 63 | - ->willReturn([]); |
|
| 63 | + ->willReturn([]); |
|
| 64 | 64 | |
| 65 | 65 | $configuration->method('getMetadataDriverImpl') |
| 66 | - ->willReturn($mappingDriver); |
|
| 66 | + ->willReturn($mappingDriver); |
|
| 67 | 67 | |
| 68 | 68 | $em->method('getConfiguration') |
| 69 | - ->willReturn($configuration); |
|
| 69 | + ->willReturn($configuration); |
|
| 70 | 70 | |
| 71 | 71 | $application = new Application(); |
| 72 | 72 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |
@@ -95,17 +95,17 @@ discard block |
||
| 95 | 95 | $em = $this->createMock(EntityManagerInterface::class); |
| 96 | 96 | |
| 97 | 97 | $mappingDriver->method('getAllClassNames') |
| 98 | - ->willReturn(['InvalidEntity']); |
|
| 98 | + ->willReturn(['InvalidEntity']); |
|
| 99 | 99 | |
| 100 | 100 | $configuration->method('getMetadataDriverImpl') |
| 101 | - ->willReturn($mappingDriver); |
|
| 101 | + ->willReturn($mappingDriver); |
|
| 102 | 102 | |
| 103 | 103 | $em->method('getConfiguration') |
| 104 | - ->willReturn($configuration); |
|
| 104 | + ->willReturn($configuration); |
|
| 105 | 105 | |
| 106 | 106 | $em->method('getClassMetadata') |
| 107 | - ->with('InvalidEntity') |
|
| 108 | - ->willThrowException(new MappingException('exception message')); |
|
| 107 | + ->with('InvalidEntity') |
|
| 108 | + ->willThrowException(new MappingException('exception message')); |
|
| 109 | 109 | |
| 110 | 110 | $application = new Application(); |
| 111 | 111 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $this->tester->execute( |
| 63 | 63 | [ |
| 64 | 64 | 'command' => $this->command->getName(), |
| 65 | - 'dql' => 'SELECT e FROM ' . DateTimeModel::class . ' e', |
|
| 65 | + 'dql' => 'SELECT e FROM '.DateTimeModel::class.' e', |
|
| 66 | 66 | ] |
| 67 | 67 | ) |
| 68 | 68 | ); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $this->tester->execute( |
| 81 | 81 | [ |
| 82 | 82 | 'command' => $this->command->getName(), |
| 83 | - 'dql' => 'SELECT e FROM ' . DateTimeModel::class . ' e', |
|
| 83 | + 'dql' => 'SELECT e FROM '.DateTimeModel::class.' e', |
|
| 84 | 84 | '--show-sql' => 'true', |
| 85 | 85 | ] |
| 86 | 86 | ) |
@@ -143,16 +143,16 @@ |
||
| 143 | 143 | $em = $this->createMock(EntityManagerInterface::class); |
| 144 | 144 | |
| 145 | 145 | $configuration->method('getDefaultRepositoryClassName') |
| 146 | - ->willReturn('fooRepository'); |
|
| 146 | + ->willReturn('fooRepository'); |
|
| 147 | 147 | |
| 148 | 148 | $metadataFactory->method('getAllMetadata') |
| 149 | 149 | ->willReturn([]); |
| 150 | 150 | |
| 151 | 151 | $em->method('getMetadataFactory') |
| 152 | - ->willReturn($metadataFactory); |
|
| 152 | + ->willReturn($metadataFactory); |
|
| 153 | 153 | |
| 154 | 154 | $em->method('getConfiguration') |
| 155 | - ->willReturn($configuration); |
|
| 155 | + ->willReturn($configuration); |
|
| 156 | 156 | |
| 157 | 157 | $application = new Application(); |
| 158 | 158 | $application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($em)])); |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | parent::setUp(); |
| 32 | 32 | |
| 33 | - $this->path = \sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('doctrine_'); |
|
| 33 | + $this->path = \sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('doctrine_'); |
|
| 34 | 34 | |
| 35 | 35 | \mkdir($this->path); |
| 36 | 36 | |
| 37 | 37 | $metadataDriver = $this->_em->getConfiguration()->getMetadataDriverImpl(); |
| 38 | - $metadataDriver->addPaths([__DIR__ . '/../../../../Models/DDC3231/']); |
|
| 38 | + $metadataDriver->addPaths([__DIR__.'/../../../../Models/DDC3231/']); |
|
| 39 | 39 | |
| 40 | 40 | $this->application = new Application(); |
| 41 | 41 | $this->application->setHelperSet(new HelperSet(['em' => new EntityManagerHelper($this->_em)])); |
@@ -73,13 +73,13 @@ discard block |
||
| 73 | 73 | $this->generateRepositories('DDC3231User1'); |
| 74 | 74 | |
| 75 | 75 | $cname = 'Doctrine\Tests\Models\DDC3231\DDC3231User1Repository'; |
| 76 | - $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname) . '.php'; |
|
| 76 | + $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname).'.php'; |
|
| 77 | 77 | |
| 78 | - self::assertFileExists($this->path . DIRECTORY_SEPARATOR . $fname); |
|
| 79 | - self::assertFileExists($this->path . DIRECTORY_SEPARATOR . 'DDC3231User1NoNamespaceRepository.php'); |
|
| 78 | + self::assertFileExists($this->path.DIRECTORY_SEPARATOR.$fname); |
|
| 79 | + self::assertFileExists($this->path.DIRECTORY_SEPARATOR.'DDC3231User1NoNamespaceRepository.php'); |
|
| 80 | 80 | |
| 81 | - require $this->path . DIRECTORY_SEPARATOR . $fname; |
|
| 82 | - require $this->path . DIRECTORY_SEPARATOR . 'DDC3231User1NoNamespaceRepository.php'; |
|
| 81 | + require $this->path.DIRECTORY_SEPARATOR.$fname; |
|
| 82 | + require $this->path.DIRECTORY_SEPARATOR.'DDC3231User1NoNamespaceRepository.php'; |
|
| 83 | 83 | |
| 84 | 84 | self::assertTrue(class_exists($cname)); |
| 85 | 85 | self::assertTrue(class_exists('DDC3231User1NoNamespaceRepository')); |
@@ -96,13 +96,13 @@ discard block |
||
| 96 | 96 | $this->generateRepositories('DDC3231User2', DDC3231EntityRepository::class); |
| 97 | 97 | |
| 98 | 98 | $cname = 'Doctrine\Tests\Models\DDC3231\DDC3231User2Repository'; |
| 99 | - $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname) . '.php'; |
|
| 99 | + $fname = str_replace('\\', DIRECTORY_SEPARATOR, $cname).'.php'; |
|
| 100 | 100 | |
| 101 | - self::assertFileExists($this->path . DIRECTORY_SEPARATOR . $fname); |
|
| 102 | - self::assertFileExists($this->path . DIRECTORY_SEPARATOR . 'DDC3231User2NoNamespaceRepository.php'); |
|
| 101 | + self::assertFileExists($this->path.DIRECTORY_SEPARATOR.$fname); |
|
| 102 | + self::assertFileExists($this->path.DIRECTORY_SEPARATOR.'DDC3231User2NoNamespaceRepository.php'); |
|
| 103 | 103 | |
| 104 | - require $this->path . DIRECTORY_SEPARATOR . $fname; |
|
| 105 | - require $this->path . DIRECTORY_SEPARATOR . 'DDC3231User2NoNamespaceRepository.php'; |
|
| 104 | + require $this->path.DIRECTORY_SEPARATOR.$fname; |
|
| 105 | + require $this->path.DIRECTORY_SEPARATOR.'DDC3231User2NoNamespaceRepository.php'; |
|
| 106 | 106 | |
| 107 | 107 | self::assertTrue(class_exists($cname)); |
| 108 | 108 | self::assertTrue(class_exists('DDC3231User2NoNamespaceRepository')); |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | protected function configure() |
| 44 | 44 | { |
| 45 | 45 | $this->setName('orm:schema-tool:create') |
| 46 | - ->setDescription('Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output') |
|
| 47 | - ->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.') |
|
| 48 | - ->setHelp(<<<EOT |
|
| 46 | + ->setDescription('Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output') |
|
| 47 | + ->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.') |
|
| 48 | + ->setHelp(<<<EOT |
|
| 49 | 49 | Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output. |
| 50 | 50 | |
| 51 | 51 | <comment>Hint:</comment> If you have a database with tables that should not be managed |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | \$config->setFilterSchemaAssetsExpression(\$regexp); |
| 56 | 56 | EOT |
| 57 | - ); |
|
| 57 | + ); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -43,11 +43,11 @@ discard block |
||
| 43 | 43 | protected function configure() |
| 44 | 44 | { |
| 45 | 45 | $this->setName('orm:schema-tool:drop') |
| 46 | - ->setDescription('Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output') |
|
| 47 | - ->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.') |
|
| 48 | - ->addOption('force', 'f', InputOption::VALUE_NONE, "Don't ask for the deletion of the database, but force the operation to run.") |
|
| 49 | - ->addOption('full-database', null, InputOption::VALUE_NONE, 'Instead of using the Class Metadata to detect the database table schema, drop ALL assets that the database contains.') |
|
| 50 | - ->setHelp(<<<EOT |
|
| 46 | + ->setDescription('Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output') |
|
| 47 | + ->addOption('dump-sql', null, InputOption::VALUE_NONE, 'Instead of trying to apply generated SQLs into EntityManager Storage Connection, output them.') |
|
| 48 | + ->addOption('force', 'f', InputOption::VALUE_NONE, "Don't ask for the deletion of the database, but force the operation to run.") |
|
| 49 | + ->addOption('full-database', null, InputOption::VALUE_NONE, 'Instead of using the Class Metadata to detect the database table schema, drop ALL assets that the database contains.') |
|
| 50 | + ->setHelp(<<<EOT |
|
| 51 | 51 | Processes the schema and either drop the database schema of EntityManager Storage Connection or generate the SQL output. |
| 52 | 52 | Beware that the complete database is dropped by this command, even tables that are not relevant to your metadata model. |
| 53 | 53 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | \$config->setFilterSchemaAssetsExpression(\$regexp); |
| 59 | 59 | EOT |
| 60 | - ); |
|
| 60 | + ); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |