Passed
Pull Request — 2.8.x (#7975)
by
unknown
09:40 queued 10s
created
lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
     protected function configure()
46 46
     {
47 47
         $this->setName('orm:clear-cache:query')
48
-             ->setDescription('Clear all query cache of the various cache drivers')
49
-             ->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, cache entries will be flushed instead of deleted/invalidated.')
50
-             ->setHelp(<<<EOT
48
+                ->setDescription('Clear all query cache of the various cache drivers')
49
+                ->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, cache entries will be flushed instead of deleted/invalidated.')
50
+                ->setHelp(<<<EOT
51 51
 The <info>%command.name%</info> command is meant to clear the query cache of associated Entity Manager.
52 52
 It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
53 53
 instance completely.
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 Finally, be aware that if <info>--flush</info> option is passed, not all cache providers are able to flush entries,
65 65
 because of a limitation of its execution nature.
66 66
 EOT
67
-             );
67
+                );
68 68
     }
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryRegionCommand.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     protected function configure()
43 43
     {
44 44
         $this->setName('orm:clear-cache:region:query')
45
-             ->setDescription('Clear a second-level cache query region')
46
-             ->addArgument('region-name', InputArgument::OPTIONAL, 'The query region to clear.')
47
-             ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all query regions will be deleted/invalidated.')
48
-             ->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
49
-             ->setHelp(<<<EOT
45
+                ->setDescription('Clear a second-level cache query region')
46
+                ->addArgument('region-name', InputArgument::OPTIONAL, 'The query region to clear.')
47
+                ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all query regions will be deleted/invalidated.')
48
+                ->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
49
+                ->setHelp(<<<EOT
50 50
 The <info>%command.name%</info> command is meant to clear a second-level cache query region for an associated Entity Manager.
51 51
 It is possible to delete/invalidate all query region, a specific query region or flushes the cache provider.
52 52
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 Finally, be aware that if <info>--flush</info> option is passed,
71 71
 not all cache providers are able to flush entries, because of a limitation of its execution nature.
72 72
 EOT
73
-             );
73
+                );
74 74
     }
75 75
 
76 76
     /**
Please login to merge, or discard this patch.
Doctrine/ORM/Tools/Console/Command/ClearCache/CollectionRegionCommand.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
     protected function configure()
43 43
     {
44 44
         $this->setName('orm:clear-cache:region:collection')
45
-             ->setDescription('Clear a second-level cache collection region')
46
-             ->addArgument('owner-class', InputArgument::OPTIONAL, 'The owner entity name.')
47
-             ->addArgument('association', InputArgument::OPTIONAL, 'The association collection name.')
48
-             ->addArgument('owner-id', InputArgument::OPTIONAL, 'The owner identifier.')
49
-             ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all entity regions will be deleted/invalidated.')
50
-             ->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
51
-             ->setHelp(<<<EOT
45
+                ->setDescription('Clear a second-level cache collection region')
46
+                ->addArgument('owner-class', InputArgument::OPTIONAL, 'The owner entity name.')
47
+                ->addArgument('association', InputArgument::OPTIONAL, 'The association collection name.')
48
+                ->addArgument('owner-id', InputArgument::OPTIONAL, 'The owner identifier.')
49
+                ->addOption('all', null, InputOption::VALUE_NONE, 'If defined, all entity regions will be deleted/invalidated.')
50
+                ->addOption('flush', null, InputOption::VALUE_NONE, 'If defined, all cache entries will be flushed.')
51
+                ->setHelp(<<<EOT
52 52
 The <info>%command.name%</info> command is meant to clear a second-level cache collection regions for an associated Entity Manager.
53 53
 It is possible to delete/invalidate all collection region, a specific collection region or flushes the cache provider.
54 54
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 Finally, be aware that if <info>--flush</info> option is passed,
73 73
 not all cache providers are able to flush entries, because of a limitation of its execution nature.
74 74
 EOT
75
-             );
75
+                );
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
         }
98 98
 
99 99
         if ($input->getOption('flush')) {
100
-            $collectionRegion  = $cache->getCollectionCacheRegion($ownerClass, $assoc);
100
+            $collectionRegion = $cache->getCollectionCacheRegion($ownerClass, $assoc);
101 101
 
102 102
             if ( ! $collectionRegion instanceof DefaultRegion) {
103 103
                 throw new \InvalidArgumentException(sprintf(
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
     protected function configure()
41 41
     {
42 42
         $this->setName('orm:info')
43
-             ->setDescription('Show basic information about all mapped entities')
44
-             ->setHelp(<<<EOT
43
+                ->setDescription('Show basic information about all mapped entities')
44
+                ->setHelp(<<<EOT
45 45
 The <info>%command.name%</info> shows basic information about which
46 46
 entities exist and possibly if their mapping information contains errors or
47 47
 not.
48 48
 EOT
49
-             );
49
+                );
50 50
     }
51 51
 
52 52
     /**
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
         $entityManager = $this->getHelper('em')->getEntityManager();
61 61
 
62 62
         $entityClassNames = $entityManager->getConfiguration()
63
-                                          ->getMetadataDriverImpl()
64
-                                          ->getAllClassNames();
63
+                                            ->getMetadataDriverImpl()
64
+                                            ->getAllClassNames();
65 65
 
66 66
         if ( ! $entityClassNames) {
67 67
             $ui->caution(
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 1 patch
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.
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
     protected function configure()
43 43
     {
44 44
         $this->setName('orm:mapping:describe')
45
-             ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
46
-             ->setDescription('Display information about mapped objects')
47
-             ->setHelp(<<<EOT
45
+                ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
46
+                ->setDescription('Display information about mapped objects')
47
+                ->setHelp(<<<EOT
48 48
 The %command.full_name% command describes the metadata for the given full or partial entity class name.
49 49
 
50 50
     <info>%command.full_name%</info> My\Namespace\Entity\MyEntity
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     <info>%command.full_name%</info> MyEntity
55 55
 EOT
56
-             );
56
+                );
57 57
     }
58 58
 
59 59
     /**
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
     private function getMappedEntities(EntityManagerInterface $entityManager)
135 135
     {
136 136
         $entityClassNames = $entityManager->getConfiguration()
137
-                                          ->getMetadataDriverImpl()
138
-                                          ->getAllClassNames();
137
+                                            ->getMetadataDriverImpl()
138
+                                            ->getAllClassNames();
139 139
 
140 140
         if ( ! $entityClassNames) {
141 141
             throw new \InvalidArgumentException(
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 
166 166
         $matches = array_filter(
167 167
             $this->getMappedEntities($entityManager),
168
-            function ($mappedEntity) use ($entityName) {
169
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
168
+            function($mappedEntity) use ($entityName) {
169
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
170 170
             }
171 171
         );
172 172
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         }
206 206
 
207 207
         if (is_bool($value)) {
208
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
208
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
209 209
         }
210 210
 
211 211
         if (empty($value)) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -100,15 +100,15 @@
 block discarded – undo
100 100
     protected function configure()
101 101
     {
102 102
         $this->setName('orm:convert-d1-schema')
103
-             ->setAliases(['orm:convert:d1-schema'])
104
-             ->setDescription('Converts Doctrine 1.x schema into a Doctrine 2.x schema')
105
-             ->addArgument('from-path', InputArgument::REQUIRED, 'The path of Doctrine 1.X schema information.')
106
-             ->addArgument('to-type', InputArgument::REQUIRED, 'The destination Doctrine 2.X mapping type.')
107
-             ->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your Doctrine 2.X mapping information.')
108
-             ->addOption('from', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Optional paths of Doctrine 1.X schema information.', [])
109
-             ->addOption('extend', null, InputOption::VALUE_OPTIONAL, 'Defines a base class to be extended by generated entity classes.')
110
-             ->addOption('num-spaces', null, InputOption::VALUE_OPTIONAL, 'Defines the number of indentation spaces', 4)
111
-             ->setHelp('Converts Doctrine 1.x schema into a Doctrine 2.x schema.');
103
+                ->setAliases(['orm:convert:d1-schema'])
104
+                ->setDescription('Converts Doctrine 1.x schema into a Doctrine 2.x schema')
105
+                ->addArgument('from-path', InputArgument::REQUIRED, 'The path of Doctrine 1.X schema information.')
106
+                ->addArgument('to-type', InputArgument::REQUIRED, 'The destination Doctrine 2.X mapping type.')
107
+                ->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your Doctrine 2.X mapping information.')
108
+                ->addOption('from', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Optional paths of Doctrine 1.X schema information.', [])
109
+                ->addOption('extend', null, InputOption::VALUE_OPTIONAL, 'Defines a base class to be extended by generated entity classes.')
110
+                ->addOption('num-spaces', null, InputOption::VALUE_OPTIONAL, 'Defines the number of indentation spaces', 4)
111
+                ->setHelp('Converts Doctrine 1.x schema into a Doctrine 2.x schema.');
112 112
     }
113 113
 
114 114
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     protected function execute(InputInterface $input, OutputInterface $output)
121 121
     {
122 122
         $ui = new SymfonyStyle($input, $output);
123
-        $ui->warning('Command ' . $this->getName() . ' is deprecated and will be removed in Doctrine ORM 3.0.');
123
+        $ui->warning('Command '.$this->getName().' is deprecated and will be removed in Doctrine ORM 3.0.');
124 124
 
125 125
         // Process source directories
126 126
         $fromPaths = array_merge([$input->getArgument('from-path')], $input->getOption('from'));
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             $exporter->setMetadata($metadata);
205 205
             $exporter->export();
206 206
 
207
-            $output->writeln(PHP_EOL . sprintf(
207
+            $output->writeln(PHP_EOL.sprintf(
208 208
                 'Converting Doctrine 1.X schema to "<info>%s</info>" mapping type in "<info>%s</info>"', $toType, $destPath
209 209
             ));
210 210
         } else {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH6699Test.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
     public function testMixedParametersWithZeroNumber() : void
21 21
     {
22 22
         $query = $this->_em->createQueryBuilder()
23
-                           ->select('u')
24
-                           ->from(CmsUser::class, 'u')
25
-                           ->andWhere('u.username = :username')
26
-                           ->andWhere('u.id = ?0')
27
-                           ->getQuery();
23
+                            ->select('u')
24
+                            ->from(CmsUser::class, 'u')
25
+                            ->andWhere('u.username = :username')
26
+                            ->andWhere('u.id = ?0')
27
+                            ->getQuery();
28 28
 
29 29
         $query->setParameter('username', 'bar');
30 30
         $query->setParameter(0, 0);
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
     public function testMixedParametersWithZeroNumberOnQueryBuilder() : void
40 40
     {
41 41
         $query = $this->_em->createQueryBuilder()
42
-                           ->select('u')
43
-                           ->from(CmsUser::class, 'u')
44
-                           ->andWhere('u.username = :username')
45
-                           ->andWhere('u.id = ?0')
46
-                           ->setParameter('username', 'bar')
47
-                           ->setParameter(0, 0)
48
-                           ->getQuery();
42
+                            ->select('u')
43
+                            ->from(CmsUser::class, 'u')
44
+                            ->andWhere('u.username = :username')
45
+                            ->andWhere('u.id = ?0')
46
+                            ->setParameter('username', 'bar')
47
+                            ->setParameter(0, 0)
48
+                            ->getQuery();
49 49
 
50 50
         $query->execute();
51 51
 
Please login to merge, or discard this patch.