Completed
Push — master ( e1bb9e...9b8b5d )
by Guilherme
12:19 queued 05:19
created
lib/Doctrine/ORM/Event/PreUpdateEventArgs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
      */
101 101
     private function assertValidField($field)
102 102
     {
103
-        if (! isset($this->entityChangeSet[$field])) {
103
+        if ( ! isset($this->entityChangeSet[$field])) {
104 104
             throw new InvalidArgumentException(sprintf(
105 105
                 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.',
106 106
                 $field,
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         if ($property instanceof AssociationMetadata) {
56 56
             throw new RuntimeException(
57
-                'Paginating an entity with foreign key as identifier only works when using the Output Walkers. ' .
57
+                'Paginating an entity with foreign key as identifier only works when using the Output Walkers. '.
58 58
                 'Call Paginator#setUseOutputWalkers(true) before iterating the paginator.'
59 59
             );
60 60
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $AST->selectClause->selectExpressions = [new SelectExpression($pathExpression, '_dctrn_id')];
73 73
         $AST->selectClause->isDistinct        = true;
74 74
 
75
-        if (! isset($AST->orderByClause)) {
75
+        if ( ! isset($AST->orderByClause)) {
76 76
             return;
77 77
         }
78 78
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             if ($item->expression instanceof PathExpression) {
81 81
                 $AST->selectClause->selectExpressions[] = new SelectExpression(
82 82
                     $this->createSelectExpressionItem($item->expression),
83
-                    '_dctrn_ord' . $this->aliasCounter++
83
+                    '_dctrn_ord'.$this->aliasCounter++
84 84
                 );
85 85
 
86 86
                 continue;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
 
192 192
         $innerSql           = $this->getInnerSQL($AST);
193 193
         $sqlIdentifier      = $this->getSQLIdentifier($AST);
194
-        $sqlAliasIdentifier = array_map(static function ($info) {
194
+        $sqlAliasIdentifier = array_map(static function($info) {
195 195
             return $info['alias'];
196 196
         }, $sqlIdentifier);
197 197
 
198 198
         if ($hasOrderBy) {
199
-            $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlAliasIdentifier);
200
-            $sqlPiece     = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum';
199
+            $orderGroupBy = ' GROUP BY '.implode(', ', $sqlAliasIdentifier);
200
+            $sqlPiece     = 'MIN('.$this->walkResultVariable('dctrn_rownum').') AS dctrn_minrownum';
201 201
 
202 202
             $sqlAliasIdentifier[] = $sqlPiece;
203 203
             $sqlIdentifier[]      = [
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $sql = sprintf('SELECT DISTINCT %s FROM (%s) dctrn_result', implode(', ', $sqlAliasIdentifier), $innerSql);
211 211
 
212 212
         if ($hasOrderBy) {
213
-            $sql .= $orderGroupBy . $outerOrderBy;
213
+            $sql .= $orderGroupBy.$outerOrderBy;
214 214
         }
215 215
 
216 216
         // Apply the limit and offset.
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
         $innerSql           = $this->getInnerSQL($AST);
256 256
         $sqlIdentifier      = $this->getSQLIdentifier($AST);
257
-        $sqlAliasIdentifier = array_map(static function ($info) {
257
+        $sqlAliasIdentifier = array_map(static function($info) {
258 258
             return $info['alias'];
259 259
         }, $sqlIdentifier);
260 260
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
             $idVar = $pathExpression->identificationVariable;
312 312
             $field = $pathExpression->field;
313 313
 
314
-            if (! isset($selects[$idVar])) {
314
+            if ( ! isset($selects[$idVar])) {
315 315
                 $selects[$idVar] = [];
316 316
             }
317 317
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
             if ($selectExpression instanceof SelectExpression) {
325 325
                 $idVar = $selectExpression->expression;
326 326
 
327
-                if (! is_string($idVar)) {
327
+                if ( ! is_string($idVar)) {
328 328
                     continue;
329 329
                 }
330 330
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
         ?OrderByClause $orderByClause
360 360
     ) : string {
361 361
         // If the sql statement has an order by clause, we need to wrap it in a new select distinct statement
362
-        if (! $orderByClause) {
362
+        if ( ! $orderByClause) {
363 363
             return $sql;
364 364
         }
365 365
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             $orderByItems[] = $orderByItemString;
398 398
             $identifier     = substr($orderByItemString, 0, strrpos($orderByItemString, ' '));
399 399
 
400
-            if (! in_array($identifier, $identifiers, true)) {
400
+            if ( ! in_array($identifier, $identifiers, true)) {
401 401
                 $identifiers[] = $identifier;
402 402
             }
403 403
         }
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
      */
551 551
     public function walkPathExpression($pathExpr)
552 552
     {
553
-        if (! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions, true)) {
553
+        if ( ! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions, true)) {
554 554
             $this->orderByPathExpressions[] = $pathExpr;
555 555
         }
556 556
 
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
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     protected function configure()
52 52
     {
53 53
         $this->setName('orm:mapping:describe')
54
-             ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
55
-             ->setDescription('Display information about mapped objects')
56
-             ->setHelp(<<<'EOT'
54
+                ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
55
+                ->setDescription('Display information about mapped objects')
56
+                ->setHelp(<<<'EOT'
57 57
 The %command.full_name% command describes the metadata for the given full or partial entity class name.
58 58
 
59 59
     <info>%command.full_name%</info> My\Namespace\Entity\MyEntity
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     <info>%command.full_name%</info> MyEntity
64 64
 EOT
65
-             );
65
+                );
66 66
     }
67 67
 
68 68
     /**
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
     private function getMappedEntities(EntityManagerInterface $entityManager)
140 140
     {
141 141
         $entityClassNames = $entityManager->getConfiguration()
142
-                                          ->getMetadataDriverImpl()
143
-                                          ->getAllClassNames();
142
+                                            ->getMetadataDriverImpl()
143
+                                            ->getAllClassNames();
144 144
 
145 145
         if (! $entityClassNames) {
146 146
             throw new InvalidArgumentException(
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
                                           ->getMetadataDriverImpl()
143 143
                                           ->getAllClassNames();
144 144
 
145
-        if (! $entityClassNames) {
145
+        if ( ! $entityClassNames) {
146 146
             throw new InvalidArgumentException(
147
-                'You do not have any mapped Doctrine ORM entities according to the current configuration. ' .
147
+                'You do not have any mapped Doctrine ORM entities according to the current configuration. '.
148 148
                 'If you have entities or mapping files you should check your mapping configuration for errors.'
149 149
             );
150 150
         }
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
 
170 170
         $matches = array_filter(
171 171
             $this->getMappedEntities($entityManager),
172
-            static function ($mappedEntity) use ($entityName) {
173
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
172
+            static function($mappedEntity) use ($entityName) {
173
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
174 174
             }
175 175
         );
176 176
 
177
-        if (! $matches) {
177
+        if ( ! $matches) {
178 178
             throw new InvalidArgumentException(sprintf(
179 179
                 'Could not find any mapped Entity classes matching "%s"',
180 180
                 $entityName
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
             $output[] = $this->formatField(
228 228
                 sprintf('  %s', $parentClass->getParent()),
229
-                ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes)
229
+                ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes)
230 230
             );
231 231
         }
232 232
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         }
252 252
 
253 253
         if (is_bool($value)) {
254
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
254
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
255 255
         }
256 256
 
257 257
         if (empty($value)) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/MetadataFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $metadata = $it->current();
61 61
 
62 62
         foreach ($this->filter as $filter) {
63
-            $pregResult = preg_match('/' . $filter . '/', $metadata->getClassName());
63
+            $pregResult = preg_match('/'.$filter.'/', $metadata->getClassName());
64 64
 
65 65
             if ($pregResult === false) {
66 66
                 throw new RuntimeException(
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaValidator.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $ce = [];
80 80
 
81 81
         foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) {
82
-            if (! ($association instanceof AssociationMetadata)) {
82
+            if ( ! ($association instanceof AssociationMetadata)) {
83 83
                 continue;
84 84
             }
85 85
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         foreach ($class->getSubClasses() as $subClass) {
90
-            if (! in_array($class->getClassName(), class_parents($subClass), true)) {
90
+            if ( ! in_array($class->getClassName(), class_parents($subClass), true)) {
91 91
                 $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance.";
92 92
 
93 93
                 $ce[] = sprintf($message, $subClass, $class->getClassName());
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $fieldName       = $association->getName();
107 107
         $targetEntity    = $association->getTargetEntity();
108 108
 
109
-        if (! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
109
+        if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
110 110
             $message = "The target entity '%s' specified on %s#%s is unknown or not an entity.";
111 111
 
112 112
             return [sprintf($message, $targetEntity, $class->getClassName(), $fieldName)];
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
         /** @var ClassMetadata $targetMetadata */
127 127
         $targetMetadata    = $metadataFactory->getMetadataFor($targetEntity);
128
-        $containsForeignId = array_filter($targetMetadata->identifier, static function ($identifier) use ($targetMetadata) {
128
+        $containsForeignId = array_filter($targetMetadata->identifier, static function($identifier) use ($targetMetadata) {
129 129
             $targetProperty = $targetMetadata->getProperty($identifier);
130 130
 
131 131
             return $targetProperty instanceof AssociationMetadata;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             /** @var AssociationMetadata $targetAssociation */
142 142
             $targetAssociation = $targetMetadata->getProperty($mappedBy);
143 143
 
144
-            if (! $targetAssociation) {
144
+            if ( ! $targetAssociation) {
145 145
                 $message = 'The association %s#%s refers to the owning side property %s#%s which does not exist.';
146 146
 
147 147
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             /** @var AssociationMetadata $targetAssociation */
166 166
             $targetAssociation = $targetMetadata->getProperty($inversedBy);
167 167
 
168
-            if (! $targetAssociation) {
168
+            if ( ! $targetAssociation) {
169 169
                 $message = 'The association %s#%s refers to the inverse side property %s#%s which does not exist.';
170 170
 
171 171
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                 $joinTable               = $association->getJoinTable();
210 210
 
211 211
                 foreach ($joinTable->getJoinColumns() as $joinColumn) {
212
-                    if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) {
212
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) {
213 213
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
214 214
 
215 215
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName());
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 }
219 219
 
220 220
                 foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
221
-                    if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) {
221
+                    if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) {
222 222
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
223 223
 
224 224
                         $ce[] = sprintf($message, $inverseJoinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
                 if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) {
230 230
                     $columnNames = array_map(
231
-                        static function (JoinColumnMetadata $joinColumn) {
231
+                        static function(JoinColumnMetadata $joinColumn) {
232 232
                             return $joinColumn->getReferencedColumnName();
233 233
                         },
234 234
                         $joinTable->getInverseJoinColumns()
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
                 if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) {
245 245
                     $columnNames = array_map(
246
-                        static function (JoinColumnMetadata $joinColumn) {
246
+                        static function(JoinColumnMetadata $joinColumn) {
247 247
                             return $joinColumn->getReferencedColumnName();
248 248
                         },
249 249
                         $joinTable->getJoinColumns()
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 $joinColumns       = $association->getJoinColumns();
261 261
 
262 262
                 foreach ($joinColumns as $joinColumn) {
263
-                    if (! in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) {
263
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) {
264 264
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
265 265
 
266 266
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                     continue;
292 292
                 }
293 293
 
294
-                if (! ($targetProperty instanceof AssociationMetadata)) {
294
+                if ( ! ($targetProperty instanceof AssociationMetadata)) {
295 295
                     $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'.";
296 296
 
297 297
                     $ce[] = sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName());
Please login to merge, or discard this patch.
lib/Doctrine/ORM/OptimisticLockException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $expectedLockVersion = $expectedLockVersion instanceof DateTime ? $expectedLockVersion->getTimestamp() : $expectedLockVersion;
60 60
         $actualLockVersion   = $actualLockVersion instanceof DateTime ? $actualLockVersion->getTimestamp() : $actualLockVersion;
61 61
 
62
-        return new self('The optimistic lock failed, version ' . $expectedLockVersion . ' was expected, but is actually ' . $actualLockVersion, $entity);
62
+        return new self('The optimistic lock failed, version '.$expectedLockVersion.' was expected, but is actually '.$actualLockVersion, $entity);
63 63
     }
64 64
 
65 65
     /**
@@ -69,6 +69,6 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public static function notVersioned($entityName)
71 71
     {
72
-        return new self('Cannot obtain optimistic lock on unversioned entity ' . $entityName, null);
72
+        return new self('Cannot obtain optimistic lock on unversioned entity '.$entityName, null);
73 73
     }
74 74
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Configuration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function newDefaultAnnotationDriver(array $paths = []) : AnnotationDriver
163 163
     {
164
-        AnnotationRegistry::registerFile(__DIR__ . '/Annotation/DoctrineAnnotations.php');
164
+        AnnotationRegistry::registerFile(__DIR__.'/Annotation/DoctrineAnnotations.php');
165 165
 
166 166
         $reader = new CachedReader(new AnnotationReader(), new ArrayCache());
167 167
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     {
236 236
         $queryCacheImpl = $this->getQueryCacheImpl();
237 237
 
238
-        if (! $queryCacheImpl) {
238
+        if ( ! $queryCacheImpl) {
239 239
             throw QueryCacheNotConfigured::create();
240 240
         }
241 241
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
         $metadataCacheImpl = $this->getMetadataCacheImpl();
247 247
 
248
-        if (! $metadataCacheImpl) {
248
+        if ( ! $metadataCacheImpl) {
249 249
             throw MetadataCacheNotConfigured::create();
250 250
         }
251 251
 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     {
454 454
         $reflectionClass = new ReflectionClass($repositoryClassName);
455 455
 
456
-        if (! $reflectionClass->implementsInterface(ObjectRepository::class)) {
456
+        if ( ! $reflectionClass->implementsInterface(ObjectRepository::class)) {
457 457
             throw InvalidEntityRepository::fromClassName($repositoryClassName);
458 458
         }
459 459
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultCacheFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -182,14 +182,14 @@  discard block
 block discarded – undo
182 182
             : new DefaultRegion($regionName, $cacheAdapter, $lifetime);
183 183
 
184 184
         if ($cache->getUsage() === CacheUsage::READ_WRITE) {
185
-            if (! $this->fileLockRegionDirectory) {
185
+            if ( ! $this->fileLockRegionDirectory) {
186 186
                 throw new LogicException(
187
-                    'If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, ' .
187
+                    'If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, '.
188 188
                     'The default implementation provided by doctrine is "Doctrine\ORM\Cache\Region\FileLockRegion" if you want to use it please provide a valid directory, DefaultCacheFactory#setFileLockRegionDirectory(). '
189 189
                 );
190 190
             }
191 191
 
192
-            $directory = $this->fileLockRegionDirectory . DIRECTORY_SEPARATOR . $regionName;
192
+            $directory = $this->fileLockRegionDirectory.DIRECTORY_SEPARATOR.$regionName;
193 193
             $region    = new FileLockRegion($region, $directory, $this->regionsConfig->getLockLifetime($regionName));
194 194
         }
195 195
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     {
206 206
         $cacheAdapter = clone $this->cache;
207 207
 
208
-        if (! $cacheAdapter instanceof CacheProvider) {
208
+        if ( ! $cacheAdapter instanceof CacheProvider) {
209 209
             return $cacheAdapter;
210 210
         }
211 211
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             $namespace .= ':';
216 216
         }
217 217
 
218
-        $cacheAdapter->setNamespace($namespace . $name);
218
+        $cacheAdapter->setNamespace($namespace.$name);
219 219
 
220 220
         return $cacheAdapter;
221 221
     }
Please login to merge, or discard this patch.