Completed
Pull Request — master (#7902)
by
unknown
63:54
created
tests/Doctrine/Tests/ORM/Functional/Ticket/GH2947Test.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
     private function createQuery()
52 52
     {
53 53
         return $this->em->createQueryBuilder()
54
-                         ->select('car')
55
-                         ->from(GH2947Car::class, 'car')
56
-                         ->getQuery()
57
-                         ->useResultCache(true, 3600, 'foo-cache-id');
54
+                            ->select('car')
55
+                            ->from(GH2947Car::class, 'car')
56
+                            ->getQuery()
57
+                            ->useResultCache(true, 3600, 'foo-cache-id');
58 58
     }
59 59
 
60 60
     private function createData()
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
     private function updateData()
68 68
     {
69 69
         $this->em->createQueryBuilder()
70
-                  ->update(GH2947Car::class, 'car')
71
-                  ->set('car.brand', ':newBrand')
72
-                  ->where('car.brand = :oldBrand')
73
-                  ->setParameter('newBrand', 'Dacia')
74
-                  ->setParameter('oldBrand', 'BMW')
75
-                  ->getQuery()
76
-                  ->execute();
70
+                    ->update(GH2947Car::class, 'car')
71
+                    ->set('car.brand', ':newBrand')
72
+                    ->where('car.brand = :oldBrand')
73
+                    ->setParameter('newBrand', 'Dacia')
74
+                    ->setParameter('oldBrand', 'BMW')
75
+                    ->getQuery()
76
+                    ->execute();
77 77
     }
78 78
 }
79 79
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,19 +50,19 @@
 block discarded – undo
50 50
         $this->em->clear();
51 51
 
52 52
         $result = $this->em->createQueryBuilder()
53
-                  ->select('p')
54
-                  ->from(DDC3170ProductJoined::class, 'p')
55
-                  ->getQuery()
56
-                  ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
53
+                    ->select('p')
54
+                    ->from(DDC3170ProductJoined::class, 'p')
55
+                    ->getQuery()
56
+                    ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
57 57
 
58 58
         self::assertCount(1, $result);
59 59
         self::assertContainsOnly(DDC3170ProductJoined::class, $result);
60 60
 
61 61
         $result = $this->em->createQueryBuilder()
62
-                  ->select('p')
63
-                  ->from(DDC3170ProductSingleTable::class, 'p')
64
-                  ->getQuery()
65
-                  ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
62
+                    ->select('p')
63
+                    ->from(DDC3170ProductSingleTable::class, 'p')
64
+                    ->getQuery()
65
+                    ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT);
66 66
 
67 67
         self::assertCount(1, $result);
68 68
         self::assertContainsOnly(DDC3170ProductSingleTable::class, $result);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1925Test.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $product->addBuyer($user);
36 36
 
37 37
         $this->em->getUnitOfWork()
38
-                  ->computeChangeSets();
38
+                    ->computeChangeSets();
39 39
 
40 40
         $this->em->persist($product);
41 41
         $this->em->flush();
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,8 +213,8 @@
 block discarded – undo
213 213
         $this->metadataCache = [];
214 214
 
215 215
         $this->em
216
-             ->getEventManager()
217
-             ->removeEventListener([Events::onClear], $this);
216
+                ->getEventManager()
217
+                ->removeEventListener([Events::onClear], $this);
218 218
     }
219 219
 
220 220
     /**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $row = $this->stmt->fetch(FetchMode::ASSOCIATIVE);
153 153
 
154
-        if (! $row) {
154
+        if ( ! $row) {
155 155
             $this->cleanup();
156 156
 
157 157
             return false;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
                         : $value;
294 294
 
295 295
                     if ($cacheKeyInfo['isIdentifier'] && $value !== null) {
296
-                        $id[$dqlAlias]                .= '|' . $value;
296
+                        $id[$dqlAlias]                .= '|'.$value;
297 297
                         $nonemptyComponents[$dqlAlias] = true;
298 298
                     }
299 299
                     break;
@@ -329,10 +329,10 @@  discard block
 block discarded – undo
329 329
 
330 330
             // WARNING: BC break! We know this is the desired behavior to type convert values, but this
331 331
             // erroneous behavior exists since 2.0 and we're forced to keep compatibility.
332
-            if (! isset($cacheKeyInfo['isScalar'])) {
332
+            if ( ! isset($cacheKeyInfo['isScalar'])) {
333 333
                 $dqlAlias  = $cacheKeyInfo['dqlAlias'];
334 334
                 $type      = $cacheKeyInfo['type'];
335
-                $fieldName = $dqlAlias . '_' . $fieldName;
335
+                $fieldName = $dqlAlias.'_'.$fieldName;
336 336
                 $value     = $type
337 337
                     ? $type->convertToPHPValue($value, $this->platform)
338 338
                     : $value;
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     private function getDiscriminatorValues(ClassMetadata $classMetadata) : array
434 434
     {
435 435
         $values = \array_map(
436
-            function (string $subClass) : string {
436
+            function(string $subClass) : string {
437 437
                 return (string) $this->getClassMetadata($subClass)->discriminatorValue;
438 438
             },
439 439
             $classMetadata->getSubClasses()
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
      */
454 454
     protected function getClassMetadata($className)
455 455
     {
456
-        if (! isset($this->metadataCache[$className])) {
456
+        if ( ! isset($this->metadataCache[$className])) {
457 457
             $this->metadataCache[$className] = $this->em->getClassMetadata($className);
458 458
         }
459 459
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Console/Command/InfoCommandTest.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)]));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Console/Command/RunDqlCommandTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             )
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@
 block discarded – undo
45 45
     protected function configure()
46 46
     {
47 47
         $this->setName('orm:validate-schema')
48
-             ->setDescription('Validate the mapping files')
49
-             ->addOption('skip-mapping', null, InputOption::VALUE_NONE, 'Skip the mapping validation check')
50
-             ->addOption('skip-sync', null, InputOption::VALUE_NONE, 'Skip checking if the mapping is in sync with the database')
51
-             ->setHelp('Validate that the mapping files are correct and in sync with the database.');
48
+                ->setDescription('Validate the mapping files')
49
+                ->addOption('skip-mapping', null, InputOption::VALUE_NONE, 'Skip the mapping validation check')
50
+                ->addOption('skip-sync', null, InputOption::VALUE_NONE, 'Skip checking if the mapping is in sync with the database')
51
+                ->setHelp('Validate that the mapping files are correct and in sync with the database.');
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             $ui->text('<comment>[SKIPPED] The mapping was not checked.</comment>');
47 47
         }
48 48
 
49
-        if (! $skipMapping) {
49
+        if ( ! $skipMapping) {
50 50
             $errors = $validator->validateMapping();
51 51
 
52 52
             if ($errors) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         if ($input->getOption('skip-sync')) {
74 74
             $ui->text('<comment>[SKIPPED] The database was not checked for synchronicity.</comment>');
75
-        } elseif (! $validator->schemaInSyncWithMetadata()) {
75
+        } elseif ( ! $validator->schemaInSyncWithMetadata()) {
76 76
             $ui->error('The database schema is not in sync with the current mapping file.');
77 77
             $exit += 2;
78 78
         } else {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
     protected function configure()
46 46
     {
47 47
         $this->setName('orm:ensure-production-settings')
48
-             ->setDescription('Verify that Doctrine is properly configured for a production environment')
49
-             ->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.')
50
-             ->setHelp('Verify that Doctrine is properly configured for a production environment.');
48
+                ->setDescription('Verify that Doctrine is properly configured for a production environment')
49
+                ->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.')
50
+                ->setHelp('Verify that Doctrine is properly configured for a production environment.');
51 51
     }
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
     protected function configure()
47 47
     {
48 48
         $this->setName('orm:generate-proxies')
49
-             ->setAliases(['orm:generate:proxies'])
50
-             ->setDescription('Generates proxy classes for entity classes')
51
-             ->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.')
52
-             ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
53
-             ->setHelp('Generates proxy classes for entity classes.');
49
+                ->setAliases(['orm:generate:proxies'])
50
+                ->setDescription('Generates proxy classes for entity classes')
51
+                ->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.')
52
+                ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
53
+                ->setHelp('Generates proxy classes for entity classes.');
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,19 +57,19 @@
 block discarded – undo
57 57
             $destPath = $em->getConfiguration()->getProxyDir();
58 58
         }
59 59
 
60
-        if (! \is_dir($destPath)) {
60
+        if ( ! \is_dir($destPath)) {
61 61
             \mkdir($destPath, 0775, true);
62 62
         }
63 63
 
64 64
         $destPath = \realpath($destPath);
65 65
 
66
-        if (! \file_exists($destPath)) {
66
+        if ( ! \file_exists($destPath)) {
67 67
             throw new InvalidArgumentException(
68 68
                 \sprintf("Proxies destination directory '<info>%s</info>' does not exist.", $em->getConfiguration()->getProxyDir())
69 69
             );
70 70
         }
71 71
 
72
-        if (! \is_writable($destPath)) {
72
+        if ( ! \is_writable($destPath)) {
73 73
             throw new InvalidArgumentException(
74 74
                 \sprintf("Proxies destination directory '<info>%s</info>' does not have write permissions.", $destPath)
75 75
             );
Please login to merge, or discard this patch.