Completed
Branch develop (d0d4c6)
by Marco
16:40
created
lib/Doctrine/ORM/Mapping/AnsiQuoteStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             // Association defined as Id field
64 64
             $joinColumns      = $class->associationMappings[$fieldName]['joinColumns'];
65 65
             $assocColumnNames = array_map(
66
-                function ($joinColumn)
66
+                function($joinColumn)
67 67
                 {
68 68
                     return $joinColumn['name'];
69 69
                 },
@@ -81,6 +81,6 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null)
83 83
     {
84
-        return $platform->getSQLResultCasing($columnName . '_' . $counter);
84
+        return $platform->getSQLResultCasing($columnName.'_'.$counter);
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     protected function validateRuntimeMetadata($class, $parent)
313 313
     {
314
-        if ( ! $class->reflClass ) {
314
+        if ( ! $class->reflClass) {
315 315
             // only validate if there is a reflection class instance
316 316
             return;
317 317
         }
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 
477 477
         foreach ($parentClass->associationMappings as $field => $mapping) {
478 478
             if ($parentClass->isMappedSuperclass) {
479
-                if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) {
479
+                if ($mapping['type'] & ClassMetadata::TO_MANY && ! $mapping['isOwningSide']) {
480 480
                     throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field);
481 481
                 }
482 482
 
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
                 $definition = $class->sequenceGeneratorDefinition;
722 722
 
723 723
                 if ( ! $definition) {
724
-                    $sequenceName   = $class->getSequenceName($platform);
724
+                    $sequenceName = $class->getSequenceName($platform);
725 725
 
726 726
                     $definition = array(
727 727
                         'sequenceName'   => $platform->fixSchemaElementName($sequenceName),
@@ -754,14 +754,14 @@  discard block
 block discarded – undo
754 754
                 $definition = $class->customGeneratorDefinition;
755 755
 
756 756
                 if ( ! class_exists($definition['class'])) {
757
-                    throw new ORMException("Can't instantiate custom generator : " . $definition['class']);
757
+                    throw new ORMException("Can't instantiate custom generator : ".$definition['class']);
758 758
                 }
759 759
 
760 760
                 $class->setIdGenerator(new $definition['class']);
761 761
                 break;
762 762
 
763 763
             default:
764
-                throw new ORMException("Unknown generator type: " . $class->generatorType);
764
+                throw new ORMException("Unknown generator type: ".$class->generatorType);
765 765
         }
766 766
     }
767 767
 
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
      */
812 812
     protected function getFqcnFromAlias($namespaceAlias, $simpleClassName)
813 813
     {
814
-        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
814
+        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
815 815
     }
816 816
 
817 817
     /**
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
      */
836 836
     private function getTargetPlatform()
837 837
     {
838
-        if (!$this->targetPlatform) {
838
+        if ( ! $this->targetPlatform) {
839 839
             $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform();
840 840
         }
841 841
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function addIndex(array $columns, $name, array $options = [], array $flags = [])
175 175
     {
176
-        if (!isset($this->cm->table['indexes'])) {
176
+        if ( ! isset($this->cm->table['indexes'])) {
177 177
             $this->cm->table['indexes'] = array();
178 178
         }
179 179
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             $index['flags'] = $flags;
188 188
         }
189 189
 
190
-        if (!$name) {
190
+        if ( ! $name) {
191 191
             $this->cm->table['indexes'][] = $index;
192 192
 
193 193
             return $this;
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             $index['options'] = $options;
220 220
         }
221 221
 
222
-        if (!$name) {
222
+        if ( ! $name) {
223 223
             $this->cm->table['uniqueConstraints'][] = $index;
224 224
 
225 225
             return $this;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/MappingException.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required.";
285 285
 
286 286
         if ( ! empty($hint)) {
287
-            $message .= ' (Hint: ' . $hint . ')';
287
+            $message .= ' (Hint: '.$hint.')';
288 288
         }
289 289
 
290 290
         return new self($message);
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      */
315 315
     public static function reflectionFailure($entity, \ReflectionException $previousException)
316 316
     {
317
-        return new self('An error occurred in ' . $entity, 0, $previousException);
317
+        return new self('An error occurred in '.$entity, 0, $previousException);
318 318
     }
319 319
 
320 320
     /**
@@ -325,8 +325,8 @@  discard block
 block discarded – undo
325 325
      */
326 326
     public static function joinColumnMustPointToMappedField($className, $joinColumn)
327 327
     {
328
-        return new self('The column ' . $joinColumn . ' must be mapped to a field in class '
329
-            . $className . ' since it is referenced by a join column of another class.');
328
+        return new self('The column '.$joinColumn.' must be mapped to a field in class '
329
+            . $className.' since it is referenced by a join column of another class.');
330 330
     }
331 331
 
332 332
     /**
@@ -460,12 +460,12 @@  discard block
 block discarded – undo
460 460
     public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
461 461
     {
462 462
         if ( ! empty($path)) {
463
-            $path = '[' . $path . ']';
463
+            $path = '['.$path.']';
464 464
         }
465 465
 
466 466
         return new self(
467
-            'File mapping drivers must have a valid directory path, ' .
468
-            'however the given path ' . $path . ' seems to be incorrect!'
467
+            'File mapping drivers must have a valid directory path, '.
468
+            'however the given path '.$path.' seems to be incorrect!'
469 469
         );
470 470
     }
471 471
 
@@ -496,11 +496,11 @@  discard block
 block discarded – undo
496 496
     public static function duplicateDiscriminatorEntry($className, array $entries, array $map)
497 497
     {
498 498
         return new self(
499
-            "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " .
500
-            "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " .
501
-            "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map(
499
+            "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ".
500
+            "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ".
501
+            "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map(
502 502
                 function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map)
503
-            )) . "})"
503
+            ))."})"
504 504
         );
505 505
     }
506 506
 
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
     public static function sqlConversionNotAllowedForPrimaryKeyProperties(Property $property)
565 565
     {
566 566
         return new self(sprintf(
567
-            'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' .
567
+            'It is not possible to set id field "%s" to type "%s" in entity class "%s". '.
568 568
             'The type "%s" requires conversion SQL which is not allowed for identifiers.',
569 569
             $property->getName(),
570 570
             $property->getTypeName(),
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
     public static function illegalOrphanRemoval($className, $field)
665 665
     {
666 666
         return new self("Orphan removal is only allowed on one-to-one and one-to-many ".
667
-            "associations, but " . $className."#" .$field . " is not.");
667
+            "associations, but ".$className."#".$field." is not.");
668 668
     }
669 669
 
670 670
     /**
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
      */
697 697
     public static function noInheritanceOnMappedSuperClass($className)
698 698
     {
699
-        return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'.");
699
+        return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'.");
700 700
     }
701 701
 
702 702
     /**
@@ -708,8 +708,8 @@  discard block
 block discarded – undo
708 708
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
709 709
     {
710 710
         return new self(
711
-            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
712
-            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " .
711
+            "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ".
712
+            "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ".
713 713
             "to avoid this exception from occurring."
714 714
         );
715 715
     }
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
      */
723 723
     public static function lifecycleCallbackMethodNotFound($className, $methodName)
724 724
     {
725
-        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
725
+        return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback.");
726 726
     }
727 727
 
728 728
     /**
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
      */
769 769
     public static function invalidFetchMode($className, $annotation)
770 770
     {
771
-        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
771
+        return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'");
772 772
     }
773 773
 
774 774
     /**
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
      */
779 779
     public static function compositeKeyAssignedIdGeneratorRequired($className)
780 780
     {
781
-        return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
781
+        return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
782 782
     }
783 783
 
784 784
     /**
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
      */
791 791
     public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
792 792
     {
793
-        return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'.");
793
+        return new self("The target-entity ".$targetEntity." cannot be found in '".$sourceEntity."#".$associationName."'.");
794 794
     }
795 795
 
796 796
     /**
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
      */
803 803
     public static function invalidCascadeOption(array $cascades, $className, $propertyName)
804 804
     {
805
-        $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades));
805
+        $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades));
806 806
 
807 807
         return new self(sprintf(
808 808
             "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'",
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
     {
835 835
         return new self(
836 836
             sprintf(
837
-                'Infinite nesting detected for embedded property %s::%s. ' .
837
+                'Infinite nesting detected for embedded property %s::%s. '.
838 838
                 'You cannot embed an embeddable from the same type inside an embeddable.',
839 839
                 $className,
840 840
                 $propertyName
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
         $tableName  = $class->getTableName();
41 41
 
42 42
         if ( ! empty($schemaName)) {
43
-            $tableName = $schemaName . '.' . $tableName;
43
+            $tableName = $schemaName.'.'.$tableName;
44 44
 
45 45
             if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) {
46
-                $tableName = $schemaName . '__' . $class->getTableName();
46
+                $tableName = $schemaName.'__'.$class->getTableName();
47 47
             }
48 48
         }
49 49
 
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
         $schema = '';
59 59
 
60 60
         if (isset($association['joinTable']['schema'])) {
61
-            $schema = $association['joinTable']['schema'] . '.';
61
+            $schema = $association['joinTable']['schema'].'.';
62 62
         }
63 63
 
64
-        return $schema . $platform->quoteIdentifier($association['joinTable']['name']);
64
+        return $schema.$platform->quoteIdentifier($association['joinTable']['name']);
65 65
     }
66 66
 
67 67
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             // Association defined as Id field
82 82
             $joinColumns            = $class->associationMappings[$fieldName]['joinColumns'];
83 83
             $assocQuotedColumnNames = array_map(
84
-                function ($joinColumn) use ($platform)
84
+                function($joinColumn) use ($platform)
85 85
                 {
86 86
                     return $platform->quoteIdentifier($joinColumn['name']);
87 87
                 },
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         //     If the alias is to long, characters are cut off from the beginning.
105 105
         // 3 ) Strip non alphanumeric characters
106 106
         // 4 ) Prefix with "_" if the result its numeric
107
-        $columnName = $columnName . '_' . $counter;
107
+        $columnName = $columnName.'_'.$counter;
108 108
         $columnName = substr($columnName, -$platform->getMaxIdentifierLength());
109 109
         $columnName = preg_replace('/[^A-Za-z0-9_]/', '', $columnName);
110
-        $columnName = is_numeric($columnName) ? '_' . $columnName : $columnName;
110
+        $columnName = is_numeric($columnName) ? '_'.$columnName : $columnName;
111 111
 
112 112
         return $platform->getSQLResultCasing($columnName);
113 113
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
         $tableAlias = $sqlWalker->getSQLTableAlias($tableName, $dqlAlias);
87 87
         $columnName = $platform->quoteIdentifier($joinColumn['name']);
88 88
 
89
-        return $tableAlias . '.' . $columnName;
89
+        return $tableAlias.'.'.$columnName;
90 90
     }
91 91
 
92 92
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     {
205 205
         switch ($mode) {
206 206
             case self::COLUMN_RENAMING_INCREMENT:
207
-                return $columnName . $this->sqlCounter++;
207
+                return $columnName.$this->sqlCounter++;
208 208
 
209 209
             case self::COLUMN_RENAMING_CUSTOM:
210 210
                 return isset($customRenameColumns[$columnName])
@@ -329,18 +329,18 @@  discard block
 block discarded – undo
329 329
         $counter        = 0;
330 330
         $resultMapping  = $class->getSqlResultSetMapping($resultSetMappingName);
331 331
         $rootShortName  = $class->reflClass->getShortName();
332
-        $rootAlias      = strtolower($rootShortName[0]) . $counter;
332
+        $rootAlias      = strtolower($rootShortName[0]).$counter;
333 333
 
334 334
         if (isset($resultMapping['entities'])) {
335 335
             foreach ($resultMapping['entities'] as $key => $entityMapping) {
336
-                $classMetadata  = $this->em->getClassMetadata($entityMapping['entityClass']);
336
+                $classMetadata = $this->em->getClassMetadata($entityMapping['entityClass']);
337 337
 
338 338
                 if ($class->reflClass->name == $classMetadata->reflClass->name) {
339 339
                     $this->addEntityResult($classMetadata->name, $rootAlias);
340 340
                     $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias);
341 341
                 } else {
342 342
                     $shortName    = $classMetadata->reflClass->getShortName();
343
-                    $joinAlias    = strtolower($shortName[0]) . ++ $counter;
343
+                    $joinAlias    = strtolower($shortName[0]).++ $counter;
344 344
                     $associations = $class->getAssociationsByTargetClass($classMetadata->name);
345 345
 
346 346
                     $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
             $this->addMetaResult($alias, $discrColumnName, $discrColumnName, false, $discrColumnType);
390 390
         }
391 391
 
392
-        if (isset($entityMapping['fields']) && !empty($entityMapping['fields'])) {
392
+        if (isset($entityMapping['fields']) && ! empty($entityMapping['fields'])) {
393 393
             foreach ($entityMapping['fields'] as $field) {
394 394
                 $fieldName = $field['name'];
395 395
                 $relation  = null;
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
                 $sql .= ", ";
452 452
             }
453 453
 
454
-            $sql .= $tableAlias . ".";
454
+            $sql .= $tableAlias.".";
455 455
 
456 456
             if (isset($this->fieldMappings[$columnName])) {
457 457
                 $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]);
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
                 $sql .= $this->discriminatorColumns[$dqlAlias];
463 463
             }
464 464
 
465
-            $sql .= " AS " . $columnName;
465
+            $sql .= " AS ".$columnName;
466 466
         }
467 467
 
468 468
         return $sql;
Please login to merge, or discard this patch.