Completed
Pull Request — master (#6392)
by Alessandro
13:46
created
lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
78 78
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias);
79 79
 
80
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
81
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
80
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
81
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
82 82
 
83 83
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias);
84 84
         $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect)
93
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
93
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
94 94
 
95 95
         // 3. Create and store DELETE statements
96 96
         $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses);
97 97
         foreach (array_reverse($classNames) as $className) {
98 98
             $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform);
99
-            $this->_sqlStatements[] = 'DELETE FROM ' . $tableName
100
-                    . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
99
+            $this->_sqlStatements[] = 'DELETE FROM '.$tableName
100
+                    . ' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
101 101
         }
102 102
 
103 103
         // 4. Store DDL for temporary identifier table.
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
                 'type'    => Type::getType(PersisterHelper::getTypeOfColumn($idColumnName, $rootClass, $em)),
109 109
             ];
110 110
         }
111
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
112
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
111
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
112
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
113 113
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
114 114
     }
115 115
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Literal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     /**
34 34
      * @var string
35 35
      */
36
-    protected $preSeparator  = '';
36
+    protected $preSeparator = '';
37 37
 
38 38
     /**
39 39
      * @var string
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
                 [$pathExpression]
103 103
             );
104 104
             $expression = new InExpression($arithmeticExpression);
105
-            $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS);
105
+            $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS);
106 106
 
107 107
         } else {
108 108
             $expression = new NullComparisonExpression($pathExpression);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaTool.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                             $inheritedKeyColumns[] = $columnName;
224 224
                         }
225 225
                     }
226
-                    if (!empty($inheritedKeyColumns)) {
226
+                    if ( ! empty($inheritedKeyColumns)) {
227 227
                         // Add a FK constraint on the ID column
228 228
                         $table->addForeignKeyConstraint(
229 229
                             $this->quoteStrategy->getTableName(
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             }
331 331
         }
332 332
 
333
-        if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas() ) {
333
+        if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
334 334
             $schema->visit(new RemoveNamespacedAssets());
335 335
         }
336 336
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
         // For now, this is a hack required for single table inheritence, since this method is called
406 406
         // twice by single table inheritence relations
407
-        if (!$table->hasIndex('primary')) {
407
+        if ( ! $table->hasIndex('primary')) {
408 408
             //$table->setPrimaryKey($pkColumns);
409 409
         }
410 410
     }
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
             if ( ! $definingClass) {
642 642
                 throw new \Doctrine\ORM\ORMException(
643 643
                     "Column name `".$joinColumn['referencedColumnName']."` referenced for relation from ".
644
-                    $mapping['sourceEntity'] . " towards ". $mapping['targetEntity'] . " does not exist."
644
+                    $mapping['sourceEntity']." towards ".$mapping['targetEntity']." does not exist."
645 645
                 );
646 646
             }
647 647
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
                 $columnOptions = ['notnull' => false, 'columnDefinition' => $columnDef];
674 674
 
675 675
                 if (isset($joinColumn['nullable'])) {
676
-                    $columnOptions['notnull'] = !$joinColumn['nullable'];
676
+                    $columnOptions['notnull'] = ! $joinColumn['nullable'];
677 677
                 }
678 678
 
679 679
                 if (isset($fieldMapping['options'])) {
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
                 }
721 721
             }
722 722
             $blacklistedFks[$compositeName] = true;
723
-        } elseif (!isset($blacklistedFks[$compositeName])) {
723
+        } elseif ( ! isset($blacklistedFks[$compositeName])) {
724 724
             $addedFks[$compositeName] = ['foreignTableName' => $foreignTableName, 'foreignColumns' => $foreignColumns];
725 725
             $theJoinTable->addUnnamedForeignKeyConstraint(
726 726
                 $foreignTableName,
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
                 if ($table->hasPrimaryKey()) {
828 828
                     $columns = $table->getPrimaryKey()->getColumns();
829 829
                     if (count($columns) == 1) {
830
-                        $checkSequence = $table->getName() . "_" . $columns[0] . "_seq";
830
+                        $checkSequence = $table->getName()."_".$columns[0]."_seq";
831 831
                         if ($fullSchema->hasSequence($checkSequence)) {
832 832
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
833 833
                         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $schema = [];
76 76
         foreach ($this->from as $path) {
77 77
             if (is_dir($path)) {
78
-                $files = glob($path . '/*.yml');
78
+                $files = glob($path.'/*.yml');
79 79
                 foreach ($files as $file) {
80 80
                     $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
81 81
                 }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
239 239
 
240 240
             $definition = [
241
-                'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name']:$column['sequence']
241
+                'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name'] : $column['sequence']
242 242
             ];
243 243
 
244 244
             if (isset($column['sequence']['size'])) {
Please login to merge, or discard this patch.
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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
         if (isset($xmlRoot['inheritance-type'])) {
165 165
             $inheritanceType = (string) $xmlRoot['inheritance-type'];
166
-            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType));
166
+            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType));
167 167
 
168 168
             if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) {
169 169
                 // Evaluate <discriminator-column...>
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                 }
366 366
 
367 367
                 if (isset($oneToOneElement['fetch'])) {
368
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']);
368
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']);
369 369
                 }
370 370
 
371 371
                 if (isset($oneToOneElement['mapped-by'])) {
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
                 ];
415 415
 
416 416
                 if (isset($oneToManyElement['fetch'])) {
417
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']);
417
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']);
418 418
                 }
419 419
 
420 420
                 if (isset($oneToManyElement->cascade)) {
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
                 }
462 462
 
463 463
                 if (isset($manyToOneElement['fetch'])) {
464
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']);
464
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']);
465 465
                 }
466 466
 
467 467
                 if (isset($manyToOneElement['inversed-by'])) {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                 ];
504 504
 
505 505
                 if (isset($manyToManyElement['fetch'])) {
506
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']);
506
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']);
507 507
                 }
508 508
 
509 509
                 if (isset($manyToManyElement['orphan-removal'])) {
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
         // Evaluate <lifecycle-callbacks...>
629 629
         if (isset($xmlRoot->{'lifecycle-callbacks'})) {
630 630
             foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) {
631
-                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type']));
631
+                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type']));
632 632
             }
633 633
         }
634 634
 
@@ -789,12 +789,12 @@  discard block
 block discarded – undo
789 789
         $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null;
790 790
         $usage  = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null;
791 791
 
792
-        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) {
792
+        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) {
793 793
             throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage));
794 794
         }
795 795
 
796 796
         if ($usage) {
797
-            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage);
797
+            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage);
798 798
         }
799 799
 
800 800
         return [
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.