Failed Conditions
Pull Request — 2.6 (#7235)
by Aleksey
10:51
created
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -721,13 +721,13 @@
 block discarded – undo
721 721
         return $joinColumn;
722 722
     }
723 723
 
724
-     /**
725
-     * Parses the given field as array.
726
-     *
727
-     * @param SimpleXMLElement $fieldMapping
728
-     *
729
-     * @return array
730
-     */
724
+        /**
725
+         * Parses the given field as array.
726
+         *
727
+         * @param SimpleXMLElement $fieldMapping
728
+         *
729
+         * @return array
730
+         */
731 731
     private function columnToArray(SimpleXMLElement $fieldMapping)
732 732
     {
733 733
         $mapping = [
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         if (isset($xmlRoot['inheritance-type'])) {
166 166
             $inheritanceType = (string) $xmlRoot['inheritance-type'];
167
-            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType));
167
+            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType));
168 168
 
169 169
             if ($metadata->inheritanceType != Metadata::INHERITANCE_TYPE_NONE) {
170 170
                 // Evaluate <discriminator-column...>
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
                 }
367 367
 
368 368
                 if (isset($oneToOneElement['fetch'])) {
369
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']);
369
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']);
370 370
                 }
371 371
 
372 372
                 if (isset($oneToOneElement['mapped-by'])) {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
                 ];
416 416
 
417 417
                 if (isset($oneToManyElement['fetch'])) {
418
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']);
418
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']);
419 419
                 }
420 420
 
421 421
                 if (isset($oneToManyElement->cascade)) {
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
                 }
463 463
 
464 464
                 if (isset($manyToOneElement['fetch'])) {
465
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']);
465
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']);
466 466
                 }
467 467
 
468 468
                 if (isset($manyToOneElement['inversed-by'])) {
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
                 ];
505 505
 
506 506
                 if (isset($manyToManyElement['fetch'])) {
507
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']);
507
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']);
508 508
                 }
509 509
 
510 510
                 if (isset($manyToManyElement['orphan-removal'])) {
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 
625 625
                 // Check for `fetch`
626 626
                 if (isset($overrideElement['fetch'])) {
627
-                    $override['fetch'] = constant(Metadata::class . '::FETCH_' . (string) $overrideElement['fetch']);
627
+                    $override['fetch'] = constant(Metadata::class.'::FETCH_'.(string) $overrideElement['fetch']);
628 628
                 }
629 629
 
630 630
                 $metadata->setAssociationOverride($fieldName, $override);
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
         // Evaluate <lifecycle-callbacks...>
635 635
         if (isset($xmlRoot->{'lifecycle-callbacks'})) {
636 636
             foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) {
637
-                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type']));
637
+                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type']));
638 638
             }
639 639
         }
640 640
 
@@ -795,12 +795,12 @@  discard block
 block discarded – undo
795 795
         $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null;
796 796
         $usage  = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null;
797 797
 
798
-        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) {
798
+        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) {
799 799
             throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage));
800 800
         }
801 801
 
802 802
         if ($usage) {
803
-            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage);
803
+            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage);
804 804
         }
805 805
 
806 806
         return [
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
      */
153 153
     public function addIndex(array $columns, $name)
154 154
     {
155
-        if (!isset($this->cm->table['indexes'])) {
155
+        if ( ! isset($this->cm->table['indexes'])) {
156 156
             $this->cm->table['indexes'] = [];
157 157
         }
158 158
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1428,7 +1428,7 @@
 block discarded – undo
1428 1428
 
1429 1429
         if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) {
1430 1430
             if (isset($mapping['id']) && true === $mapping['id']) {
1431
-                 throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']);
1431
+                    throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']);
1432 1432
             }
1433 1433
 
1434 1434
             $mapping['requireSQLConversion'] = true;
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
     public function getSingleIdReflectionProperty()
697 697
     {
698 698
         if ($this->isIdentifierComposite) {
699
-            throw new BadMethodCallException("Class " . $this->name . " has a composite identifier.");
699
+            throw new BadMethodCallException("Class ".$this->name." has a composite identifier.");
700 700
         }
701 701
 
702 702
         return $this->reflFields[$this->identifier[0]];
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
      */
792 792
     public function __toString()
793 793
     {
794
-        return __CLASS__ . '@' . spl_object_hash($this);
794
+        return __CLASS__.'@'.spl_object_hash($this);
795 795
     }
796 796
 
797 797
     /**
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
     public function validateAssociations()
1026 1026
     {
1027 1027
         foreach ($this->associationMappings as $mapping) {
1028
-            if ( ! ClassLoader::classExists($mapping['targetEntity']) ) {
1028
+            if ( ! ClassLoader::classExists($mapping['targetEntity'])) {
1029 1029
                 throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']);
1030 1030
             }
1031 1031
         }
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
         }
1104 1104
 
1105 1105
         if ( ! isset($cache['region'])) {
1106
-            $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName;
1106
+            $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName;
1107 1107
         }
1108 1108
 
1109 1109
         return $cache;
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
     protected function _validateAndCompleteFieldMapping(array &$mapping)
1384 1384
     {
1385 1385
         // Check mandatory fields
1386
-        if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) {
1386
+        if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) {
1387 1387
             throw MappingException::missingFieldName($this->name);
1388 1388
         }
1389 1389
 
@@ -1496,14 +1496,14 @@  discard block
 block discarded – undo
1496 1496
                 $this->isIdentifierComposite = true;
1497 1497
             }
1498 1498
 
1499
-            if ($this->cache && !isset($mapping['cache'])) {
1499
+            if ($this->cache && ! isset($mapping['cache'])) {
1500 1500
                 throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']);
1501 1501
             }
1502 1502
         }
1503 1503
 
1504 1504
         // Mandatory attributes for both sides
1505 1505
         // Mandatory: fieldName, targetEntity
1506
-        if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) {
1506
+        if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) {
1507 1507
             throw MappingException::missingFieldName($this->name);
1508 1508
         }
1509 1509
 
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
                     throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship.");
1626 1626
                 }
1627 1627
 
1628
-                $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = [
1628
+                $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = [
1629 1629
                     'columns' => $uniqueConstraintColumns
1630 1630
                 ];
1631 1631
             }
@@ -1640,7 +1640,7 @@  discard block
 block discarded – undo
1640 1640
             unset($mapping['unique']);
1641 1641
         }
1642 1642
 
1643
-        if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
1643
+        if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) {
1644 1644
             throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']);
1645 1645
         }
1646 1646
 
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
             }
1695 1695
 
1696 1696
             $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity']
1697
-                && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns'])));
1697
+                && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns'])));
1698 1698
 
1699 1699
             if ( ! isset($mapping['joinTable']['joinColumns'])) {
1700 1700
                 $mapping['joinTable']['joinColumns'] = [
@@ -1887,7 +1887,7 @@  discard block
 block discarded – undo
1887 1887
 
1888 1888
             // Association defined as Id field
1889 1889
             $joinColumns      = $this->associationMappings[$idProperty]['joinColumns'];
1890
-            $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns);
1890
+            $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns);
1891 1891
 
1892 1892
             $columnNames = array_merge($columnNames, $assocColumnNames);
1893 1893
         }
@@ -2068,7 +2068,7 @@  discard block
 block discarded – undo
2068 2068
     public function getTemporaryIdTableName()
2069 2069
     {
2070 2070
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
2071
-        return str_replace('.', '_', $this->getTableName() . '_id_tmp');
2071
+        return str_replace('.', '_', $this->getTableName().'_id_tmp');
2072 2072
     }
2073 2073
 
2074 2074
     /**
@@ -2405,7 +2405,7 @@  discard block
 block discarded – undo
2405 2405
      */
2406 2406
     public function addNamedQuery(array $queryMapping)
2407 2407
     {
2408
-        if (!isset($queryMapping['name'])) {
2408
+        if ( ! isset($queryMapping['name'])) {
2409 2409
             throw MappingException::nameIsMandatoryForQueryMapping($this->name);
2410 2410
         }
2411 2411
 
@@ -2413,7 +2413,7 @@  discard block
 block discarded – undo
2413 2413
             throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']);
2414 2414
         }
2415 2415
 
2416
-        if (!isset($queryMapping['query'])) {
2416
+        if ( ! isset($queryMapping['query'])) {
2417 2417
             throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']);
2418 2418
         }
2419 2419
 
@@ -2440,7 +2440,7 @@  discard block
 block discarded – undo
2440 2440
      */
2441 2441
     public function addNamedNativeQuery(array $queryMapping)
2442 2442
     {
2443
-        if (!isset($queryMapping['name'])) {
2443
+        if ( ! isset($queryMapping['name'])) {
2444 2444
             throw MappingException::nameIsMandatoryForQueryMapping($this->name);
2445 2445
         }
2446 2446
 
@@ -2448,11 +2448,11 @@  discard block
 block discarded – undo
2448 2448
             throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']);
2449 2449
         }
2450 2450
 
2451
-        if (!isset($queryMapping['query'])) {
2451
+        if ( ! isset($queryMapping['query'])) {
2452 2452
             throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']);
2453 2453
         }
2454 2454
 
2455
-        if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) {
2455
+        if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) {
2456 2456
             throw MappingException::missingQueryMapping($this->name, $queryMapping['name']);
2457 2457
         }
2458 2458
 
@@ -2484,7 +2484,7 @@  discard block
 block discarded – undo
2484 2484
      */
2485 2485
     public function addSqlResultSetMapping(array $resultMapping)
2486 2486
     {
2487
-        if (!isset($resultMapping['name'])) {
2487
+        if ( ! isset($resultMapping['name'])) {
2488 2488
             throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name);
2489 2489
         }
2490 2490
 
@@ -2494,7 +2494,7 @@  discard block
 block discarded – undo
2494 2494
 
2495 2495
         if (isset($resultMapping['entities'])) {
2496 2496
             foreach ($resultMapping['entities'] as $key => $entityResult) {
2497
-                if (!isset($entityResult['entityClass'])) {
2497
+                if ( ! isset($entityResult['entityClass'])) {
2498 2498
                     throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']);
2499 2499
                 }
2500 2500
 
@@ -2513,11 +2513,11 @@  discard block
 block discarded – undo
2513 2513
 
2514 2514
                 if (isset($entityResult['fields'])) {
2515 2515
                     foreach ($entityResult['fields'] as $k => $field) {
2516
-                        if (!isset($field['name'])) {
2516
+                        if ( ! isset($field['name'])) {
2517 2517
                             throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']);
2518 2518
                         }
2519 2519
 
2520
-                        if (!isset($field['column'])) {
2520
+                        if ( ! isset($field['column'])) {
2521 2521
                             $fieldName = $field['name'];
2522 2522
                             if (strpos($fieldName, '.')) {
2523 2523
                                 list(, $fieldName) = explode('.', $fieldName);
@@ -3008,7 +3008,7 @@  discard block
 block discarded – undo
3008 3008
         }
3009 3009
 
3010 3010
         if ($definition['sequenceName'][0] == '`') {
3011
-            $definition['sequenceName']   = trim($definition['sequenceName'], '`');
3011
+            $definition['sequenceName'] = trim($definition['sequenceName'], '`');
3012 3012
             $definition['quoted'] = true;
3013 3013
         }
3014 3014
 
@@ -3100,7 +3100,7 @@  discard block
 block discarded – undo
3100 3100
     public function getAssociationTargetClass($assocName)
3101 3101
     {
3102 3102
         if ( ! isset($this->associationMappings[$assocName])) {
3103
-            throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association.");
3103
+            throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association.");
3104 3104
         }
3105 3105
 
3106 3106
         return $this->associationMappings[$assocName]['targetEntity'];
@@ -3139,7 +3139,7 @@  discard block
 block discarded – undo
3139 3139
             // Association defined as Id field
3140 3140
             $joinColumns            = $this->associationMappings[$idProperty]['joinColumns'];
3141 3141
             $assocQuotedColumnNames = array_map(
3142
-                function ($joinColumn) use ($platform) {
3142
+                function($joinColumn) use ($platform) {
3143 3143
                     return isset($joinColumn['quoted'])
3144 3144
                         ? $platform->quoteIdentifier($joinColumn['name'])
3145 3145
                         : $joinColumn['name'];
@@ -3250,7 +3250,7 @@  discard block
 block discarded – undo
3250 3250
         }
3251 3251
 
3252 3252
         if ($className !== null && strpos($className, '\\') === false && $this->namespace) {
3253
-            return $this->namespace . '\\' . $className;
3253
+            return $this->namespace.'\\'.$className;
3254 3254
         }
3255 3255
 
3256 3256
         return $className;
@@ -3302,13 +3302,13 @@  discard block
 block discarded – undo
3302 3302
         foreach ($embeddable->fieldMappings as $fieldMapping) {
3303 3303
             $fieldMapping['originalClass'] = $fieldMapping['originalClass'] ?? $embeddable->name;
3304 3304
             $fieldMapping['declaredField'] = isset($fieldMapping['declaredField'])
3305
-                ? $property . '.' . $fieldMapping['declaredField']
3305
+                ? $property.'.'.$fieldMapping['declaredField']
3306 3306
                 : $property;
3307 3307
             $fieldMapping['originalField'] = $fieldMapping['originalField'] ?? $fieldMapping['fieldName'];
3308
-            $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName'];
3308
+            $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName'];
3309 3309
 
3310
-            if (! empty($this->embeddedClasses[$property]['columnPrefix'])) {
3311
-                $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName'];
3310
+            if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) {
3311
+                $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName'];
3312 3312
             } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) {
3313 3313
                 $fieldMapping['columnName'] = $this->namingStrategy
3314 3314
                     ->embeddedFieldToColumnName(
@@ -3349,7 +3349,7 @@  discard block
 block discarded – undo
3349 3349
     {
3350 3350
         $sequencePrefix = $this->getSequencePrefix($platform);
3351 3351
         $columnName     = $this->getSingleIdentifierColumnName();
3352
-        $sequenceName   = $sequencePrefix . '_' . $columnName . '_seq';
3352
+        $sequenceName   = $sequencePrefix.'_'.$columnName.'_seq';
3353 3353
 
3354 3354
         return $sequenceName;
3355 3355
     }
@@ -3369,10 +3369,10 @@  discard block
 block discarded – undo
3369 3369
 
3370 3370
         // Prepend the schema name to the table name if there is one
3371 3371
         if ($schemaName = $this->getSchemaName()) {
3372
-            $sequencePrefix = $schemaName . '.' . $tableName;
3372
+            $sequencePrefix = $schemaName.'.'.$tableName;
3373 3373
 
3374 3374
             if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) {
3375
-                $sequencePrefix = $schemaName . '__' . $tableName;
3375
+                $sequencePrefix = $schemaName.'__'.$tableName;
3376 3376
             }
3377 3377
         }
3378 3378
 
@@ -3384,8 +3384,8 @@  discard block
 block discarded – undo
3384 3384
      */
3385 3385
     private function assertMappingOrderBy(array $mapping)
3386 3386
     {
3387
-        if (isset($mapping['orderBy']) && !is_array($mapping['orderBy'])) {
3388
-            throw new InvalidArgumentException("'orderBy' is expected to be an array, not " . gettype($mapping['orderBy']));
3387
+        if (isset($mapping['orderBy']) && ! is_array($mapping['orderBy'])) {
3388
+            throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy']));
3389 3389
         }
3390 3390
     }
3391 3391
 }
Please login to merge, or discard this patch.
ORM/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
  */
31 31
 class ReadOnlyCachedCollectionPersister extends NonStrictReadWriteCachedCollectionPersister
32 32
 {
33
-     /**
34
-     * {@inheritdoc}
35
-     */
33
+        /**
34
+         * {@inheritdoc}
35
+         */
36 36
     public function update(PersistentCollection $collection)
37 37
     {
38 38
         if ($collection->isDirty() && $collection->getSnapshot()) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Persister/Collection/AbstractCollectionPersister.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
  */
38 38
 abstract class AbstractCollectionPersister implements CachedCollectionPersister
39 39
 {
40
-     /**
41
-     * @var \Doctrine\ORM\UnitOfWork
42
-     */
40
+        /**
41
+         * @var \Doctrine\ORM\UnitOfWork
42
+         */
43 43
     protected $uow;
44 44
 
45 45
     /**
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
      */
68 68
     protected $association;
69 69
 
70
-     /**
71
-     * @var array
72
-     */
70
+        /**
71
+         * @var array
72
+         */
73 73
     protected $queuedCache = [];
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/CacheConfiguration.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function getCacheLogger()
75 75
     {
76
-         return $this->cacheLogger;
76
+            return $this->cacheLogger;
77 77
     }
78 78
 
79 79
     /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             );
116 116
         }
117 117
 
118
-         return $this->queryValidator;
118
+            return $this->queryValidator;
119 119
     }
120 120
 
121 121
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Configuration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
      */
154 154
     public function newDefaultAnnotationDriver($paths = [], $useSimpleAnnotationReader = true)
155 155
     {
156
-        AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php');
156
+        AnnotationRegistry::registerFile(__DIR__.'/Mapping/Driver/DoctrineAnnotations.php');
157 157
 
158 158
         if ($useSimpleAnnotationReader) {
159 159
             // Register the ORM Annotations in the AnnotationRegistry
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         foreach ($joinColumns as $joinColumn) {
132 132
             $columnName     = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform);
133 133
             $referencedName = $joinColumn['referencedColumnName'];
134
-            $conditions[]   = 't.' . $columnName . ' = ?';
134
+            $conditions[]   = 't.'.$columnName.' = ?';
135 135
             $params[]       = $id[$sourceClass->getFieldForColumn($referencedName)];
136 136
             $types[]        = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em);
137 137
         }
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
         }*/
161 161
 
162 162
         $sql = 'SELECT COUNT(*)'
163
-            . ' FROM ' . $joinTableName . ' t'
163
+            . ' FROM '.$joinTableName.' t'
164 164
             . $joinTargetEntitySQL
165
-            . ' WHERE ' . implode(' AND ', $conditions);
165
+            . ' WHERE '.implode(' AND ', $conditions);
166 166
 
167 167
         return $this->conn->fetchColumn($sql, $params, 0, $types);
168 168
     }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true);
192 192
 
193
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
193
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
194 194
 
195 195
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
196 196
     }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true);
208 208
 
209
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
209
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
210 210
 
211 211
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
212 212
     }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false);
224 224
 
225
-        $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
225
+        $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
226 226
 
227 227
         return (bool) $this->conn->executeUpdate($sql, $params, $types);
228 228
     }
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
         $rsm = new Query\ResultSetMappingBuilder($this->em);
272 272
         $rsm->addRootEntityFromClassMetadata($targetClass->name, 'te');
273 273
 
274
-        $sql = 'SELECT ' . $rsm->generateSelectClause()
275
-            . ' FROM ' . $tableName . ' te'
276
-            . ' JOIN ' . $joinTable  . ' t ON'
274
+        $sql = 'SELECT '.$rsm->generateSelectClause()
275
+            . ' FROM '.$tableName.' te'
276
+            . ' JOIN '.$joinTable.' t ON'
277 277
             . implode(' AND ', $onConditions)
278
-            . ' WHERE ' . implode(' AND ', $whereClauses);
278
+            . ' WHERE '.implode(' AND ', $whereClauses);
279 279
 
280 280
         $sql .= $this->getOrderingSql($criteria, $targetClass);
281 281
 
@@ -316,8 +316,8 @@  discard block
 block discarded – undo
316 316
 
317 317
         // A join is needed if there is filtering on the target entity
318 318
         $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform);
319
-        $joinSql   = ' JOIN ' . $tableName . ' te'
320
-            . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping));
319
+        $joinSql   = ' JOIN '.$tableName.' te'
320
+            . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping));
321 321
 
322 322
         return [$joinSql, $filterSql];
323 323
     }
@@ -336,12 +336,12 @@  discard block
 block discarded – undo
336 336
 
337 337
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
338 338
             if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
339
-                $filterClauses[] = '(' . $filterExpr . ')';
339
+                $filterClauses[] = '('.$filterExpr.')';
340 340
             }
341 341
         }
342 342
 
343 343
         return $filterClauses
344
-            ? '(' . implode(' AND ', $filterClauses) . ')'
344
+            ? '('.implode(' AND ', $filterClauses).')'
345 345
             : '';
346 346
     }
347 347
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
             $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
370 370
             $refColumnName  = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
371 371
 
372
-            $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName;
372
+            $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName;
373 373
         }
374 374
 
375 375
         return $conditions;
@@ -391,8 +391,8 @@  discard block
 block discarded – undo
391 391
             $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
392 392
         }
393 393
 
394
-        return 'DELETE FROM ' . $joinTable
395
-            . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
394
+        return 'DELETE FROM '.$joinTable
395
+            . ' WHERE '.implode(' = ? AND ', $columns).' = ?';
396 396
     }
397 397
 
398 398
     /**
@@ -451,8 +451,8 @@  discard block
 block discarded – undo
451 451
         }
452 452
 
453 453
         return [
454
-            'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
455
-            . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?',
454
+            'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
455
+            . ' WHERE '.implode(' = ? AND ', $columns).' = ?',
456 456
             $types,
457 457
         ];
458 458
     }
@@ -500,10 +500,10 @@  discard block
 block discarded – undo
500 500
         }
501 501
 
502 502
         return [
503
-            'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
504
-            . ' (' . implode(', ', $columns) . ')'
503
+            'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
504
+            . ' ('.implode(', ', $columns).')'
505 505
             . ' VALUES'
506
-            . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')',
506
+            . ' ('.implode(', ', array_fill(0, count($columns), '?')).')',
507 507
             $types,
508 508
         ];
509 509
     }
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
         $sourceClass   = $this->em->getClassMetadata($mapping['sourceEntity']);
589 589
         $targetClass   = $this->em->getClassMetadata($mapping['targetEntity']);
590 590
 
591
-        if (! $mapping['isOwningSide']) {
591
+        if ( ! $mapping['isOwningSide']) {
592 592
             $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']);
593 593
             $mapping                = $associationSourceClass->associationMappings[$mapping['mappedBy']];
594 594
             $joinColumns            = $mapping['joinTable']['joinColumns'];
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
             $targetRelationMode     = 'relationToTargetKeyColumns';
602 602
         }
603 603
 
604
-        $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t';
604
+        $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t';
605 605
         $whereClauses    = [];
606 606
         $params          = [];
607 607
         $types           = [];
@@ -612,14 +612,14 @@  discard block
 block discarded – undo
612 612
             $joinConditions = [];
613 613
 
614 614
             foreach ($joinColumns as $joinTableColumn) {
615
-                $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName'];
615
+                $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName'];
616 616
             }
617 617
 
618 618
             $tableName        = $this->quoteStrategy->getTableName($targetClass, $this->platform);
619
-            $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions);
619
+            $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions);
620 620
             $columnName       = $targetClass->getColumnName($indexBy);
621 621
 
622
-            $whereClauses[] = 'tr.' . $columnName . ' = ?';
622
+            $whereClauses[] = 'tr.'.$columnName.' = ?';
623 623
             $params[]       = $key;
624 624
             $types[]        = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em);
625 625
         }
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
628 628
             if (isset($mapping[$sourceRelationMode][$joinTableColumn])) {
629 629
                 $column         = $mapping[$sourceRelationMode][$joinTableColumn];
630
-                $whereClauses[] = 't.' . $joinTableColumn . ' = ?';
630
+                $whereClauses[] = 't.'.$joinTableColumn.' = ?';
631 631
                 $params[]       = $sourceClass->containsForeignIdentifier
632 632
                     ? $id[$sourceClass->getFieldForColumn($column)]
633 633
                     : $id[$sourceClass->fieldNames[$column]];
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
             } elseif ( ! $joinNeeded) {
636 636
                 $column = $mapping[$targetRelationMode][$joinTableColumn];
637 637
 
638
-                $whereClauses[] = 't.' . $joinTableColumn . ' = ?';
638
+                $whereClauses[] = 't.'.$joinTableColumn.' = ?';
639 639
                 $params[]       = $key;
640 640
                 $types[]        = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em);
641 641
             }
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping);
646 646
 
647 647
             if ($filterSql) {
648
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
648
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
649 649
                 $whereClauses[] = $filterSql;
650 650
             }
651 651
         }
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
         $types           = [];
690 690
 
691 691
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
692
-            $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?';
692
+            $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?';
693 693
 
694 694
             if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) {
695 695
                 $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn];
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping);
712 712
 
713 713
             if ($filterSql) {
714
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
714
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
715 715
                 $whereClauses[] = $filterSql;
716 716
             }
717 717
         }
@@ -760,10 +760,10 @@  discard block
 block discarded – undo
760 760
                     $targetClass,
761 761
                     $this->platform
762 762
                 );
763
-                $orderBy[] = $field . ' ' . $direction;
763
+                $orderBy[] = $field.' '.$direction;
764 764
             }
765 765
 
766
-            return ' ORDER BY ' . implode(', ', $orderBy);
766
+            return ' ORDER BY '.implode(', ', $orderBy);
767 767
         }
768 768
         return '';
769 769
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityNotFoundException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
         $ids = [];
41 41
 
42 42
         foreach ($id as $key => $value) {
43
-            $ids[] = $key . '(' . $value . ')';
43
+            $ids[] = $key.'('.$value.')';
44 44
         }
45 45
 
46 46
 
47 47
         return new self(
48
-            'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found'
48
+            'Entity of type \''.$className.'\''.($ids ? ' for IDs '.implode(', ', $ids) : '').' was not found'
49 49
         );
50 50
     }
51 51
 }
Please login to merge, or discard this patch.