Completed
Pull Request — master (#5569)
by Jérémy
10:47
created
lib/Doctrine/ORM/Tools/EntityGenerator.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
 
1357 1357
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1358 1358
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1359
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1359
+                        . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1360 1360
         }
1361 1361
 
1362 1362
         return implode("\n", $lines);
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
 
1385 1385
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1386 1386
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
1387
-                     . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1387
+                        . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1388 1388
         }
1389 1389
 
1390 1390
         return implode("\n", $lines);
@@ -1457,15 +1457,15 @@  discard block
 block discarded – undo
1457 1457
         }
1458 1458
 
1459 1459
         $replacements = array(
1460
-          '<description>'       => ucfirst($type) . ' ' . $variableName,
1461
-          '<methodTypeHint>'    => $methodTypeHint,
1462
-          '<variableType>'      => $variableType,
1463
-          '<variableName>'      => $variableName,
1464
-          '<methodName>'        => $methodName,
1465
-          '<fieldName>'         => $fieldName,
1466
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1467
-          '<entity>'            => $this->getClassName($metadata),
1468
-          '<methodTypeReturn>'  => $methodReturnType,
1460
+            '<description>'       => ucfirst($type) . ' ' . $variableName,
1461
+            '<methodTypeHint>'    => $methodTypeHint,
1462
+            '<variableType>'      => $variableType,
1463
+            '<variableName>'      => $variableName,
1464
+            '<methodName>'        => $methodName,
1465
+            '<fieldName>'         => $fieldName,
1466
+            '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1467
+            '<entity>'            => $this->getClassName($metadata),
1468
+            '<methodTypeReturn>'  => $methodReturnType,
1469 1469
         );
1470 1470
 
1471 1471
         $method = str_replace(
Please login to merge, or discard this patch.
Spacing   +143 added lines, -143 removed lines patch added patch discarded remove patch
@@ -392,14 +392,14 @@  discard block
 block discarded – undo
392 392
      */
393 393
     public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
394 394
     {
395
-        $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension;
395
+        $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name).$this->extension;
396 396
         $dir = dirname($path);
397 397
 
398 398
         if ( ! is_dir($dir)) {
399 399
             mkdir($dir, 0775, true);
400 400
         }
401 401
 
402
-        $this->isNew = !file_exists($path) || (file_exists($path) && $this->regenerateEntityIfExists);
402
+        $this->isNew = ! file_exists($path) || (file_exists($path) && $this->regenerateEntityIfExists);
403 403
 
404 404
         if ( ! $this->isNew) {
405 405
             $this->parseTokensInEntityFile(file_get_contents($path));
@@ -408,8 +408,8 @@  discard block
 block discarded – undo
408 408
         }
409 409
 
410 410
         if ($this->backupExisting && file_exists($path)) {
411
-            $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
412
-            if (!copy($path, $backupPath)) {
411
+            $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~";
412
+            if ( ! copy($path, $backupPath)) {
413 413
                 throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
414 414
             }
415 415
         }
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
             $this->generateEntityBody($metadata)
452 452
         );
453 453
 
454
-        $code = str_replace($placeHolders, $replacements, static::$classTemplate) . "\n";
454
+        $code = str_replace($placeHolders, $replacements, static::$classTemplate)."\n";
455 455
 
456 456
         return str_replace('<spaces>', $this->spaces, $code);
457 457
     }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         $body = str_replace('<spaces>', $this->spaces, $body);
473 473
         $last = strrpos($currentCode, '}');
474 474
 
475
-        return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}\n";
475
+        return substr($currentCode, 0, $last).$body.(strlen($body) > 0 ? "\n" : '')."}\n";
476 476
     }
477 477
 
478 478
     /**
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
     public function setFieldVisibility($visibility)
537 537
     {
538 538
         if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) {
539
-            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility);
539
+            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility);
540 540
         }
541 541
 
542 542
         $this->fieldVisibility = $visibility;
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
     protected function generateEntityNamespace(ClassMetadataInfo $metadata)
671 671
     {
672 672
         if ($this->hasNamespace($metadata)) {
673
-            return 'namespace ' . $this->getNamespace($metadata) .';';
673
+            return 'namespace '.$this->getNamespace($metadata).';';
674 674
         }
675 675
     }
676 676
 
@@ -690,8 +690,8 @@  discard block
 block discarded – undo
690 690
      */
691 691
     protected function generateEntityClassName(ClassMetadataInfo $metadata)
692 692
     {
693
-        return 'class ' . $this->getClassName($metadata) .
694
-            ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null);
693
+        return 'class '.$this->getClassName($metadata).
694
+            ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null);
695 695
     }
696 696
 
697 697
     /**
@@ -793,13 +793,13 @@  discard block
 block discarded – undo
793 793
         $fieldMappings = array_merge($requiredFields, $optionalFields);
794 794
 
795 795
         foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) {
796
-            $paramType = '\\' . ltrim($embeddedClass['class'], '\\');
797
-            $paramVariable = '$' . $fieldName;
796
+            $paramType = '\\'.ltrim($embeddedClass['class'], '\\');
797
+            $paramVariable = '$'.$fieldName;
798 798
 
799 799
             $paramTypes[] = $paramType;
800 800
             $paramVariables[] = $paramVariable;
801
-            $params[] = $paramType . ' ' . $paramVariable;
802
-            $fields[] = '$this->' . $fieldName . ' = ' . $paramVariable . ';';
801
+            $params[] = $paramType.' '.$paramVariable;
802
+            $fields[] = '$this->'.$fieldName.' = '.$paramVariable.';';
803 803
         }
804 804
 
805 805
         foreach ($fieldMappings as $fieldMapping) {
@@ -809,27 +809,27 @@  discard block
 block discarded – undo
809 809
                 continue;
810 810
             }
811 811
 
812
-            $paramTypes[] = $this->getType($fieldMapping['type']) . (!empty($fieldMapping['nullable']) ? '|null' : '');
813
-            $param = '$' . $fieldMapping['fieldName'];
812
+            $paramTypes[] = $this->getType($fieldMapping['type']).( ! empty($fieldMapping['nullable']) ? '|null' : '');
813
+            $param = '$'.$fieldMapping['fieldName'];
814 814
             $paramVariables[] = $param;
815 815
 
816 816
             if ($fieldMapping['type'] === 'datetime') {
817
-                $param = $this->getType($fieldMapping['type']) . ' ' . $param;
817
+                $param = $this->getType($fieldMapping['type']).' '.$param;
818 818
             }
819 819
 
820
-            if (!empty($fieldMapping['nullable'])) {
820
+            if ( ! empty($fieldMapping['nullable'])) {
821 821
                 $param .= ' = null';
822 822
             }
823 823
 
824 824
             $params[] = $param;
825 825
 
826
-            $fields[] = '$this->' . $fieldMapping['fieldName'] . ' = $' . $fieldMapping['fieldName'] . ';';
826
+            $fields[] = '$this->'.$fieldMapping['fieldName'].' = $'.$fieldMapping['fieldName'].';';
827 827
         }
828 828
 
829 829
         $maxParamTypeLength = max(array_map('strlen', $paramTypes));
830 830
         $paramTags = array_map(
831
-            function ($type, $variable) use ($maxParamTypeLength) {
832
-                return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable;
831
+            function($type, $variable) use ($maxParamTypeLength) {
832
+                return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable;
833 833
             },
834 834
             $paramTypes,
835 835
             $paramVariables
@@ -837,8 +837,8 @@  discard block
 block discarded – undo
837 837
 
838 838
         // Generate multi line constructor if the signature exceeds 120 characters.
839 839
         if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) {
840
-            $delimiter = "\n" . $this->spaces;
841
-            $params = $delimiter . implode(',' . $delimiter, $params) . "\n";
840
+            $delimiter = "\n".$this->spaces;
841
+            $params = $delimiter.implode(','.$delimiter, $params)."\n";
842 842
         } else {
843 843
             $params = implode(', ', $params);
844 844
         }
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
         $replacements = array(
847 847
             '<paramTags>' => implode("\n * ", $paramTags),
848 848
             '<params>'    => $params,
849
-            '<fields>'    => implode("\n" . $this->spaces, $fields),
849
+            '<fields>'    => implode("\n".$this->spaces, $fields),
850 850
         );
851 851
 
852 852
         $constructor = str_replace(
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 
891 891
             if ($inClass) {
892 892
                 $inClass = false;
893
-                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
893
+                $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1];
894 894
                 $this->staticReflection[$lastSeenClass]['properties'] = array();
895 895
                 $this->staticReflection[$lastSeenClass]['methods'] = array();
896 896
             }
@@ -898,16 +898,16 @@  discard block
 block discarded – undo
898 898
             if ($token[0] == T_NAMESPACE) {
899 899
                 $lastSeenNamespace = "";
900 900
                 $inNamespace = true;
901
-            } elseif ($token[0] == T_CLASS && $tokens[$i-1][0] != T_DOUBLE_COLON) {
901
+            } elseif ($token[0] == T_CLASS && $tokens[$i - 1][0] != T_DOUBLE_COLON) {
902 902
                 $inClass = true;
903 903
             } elseif ($token[0] == T_FUNCTION) {
904
-                if ($tokens[$i+2][0] == T_STRING) {
905
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]);
906
-                } elseif ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) {
907
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]);
904
+                if ($tokens[$i + 2][0] == T_STRING) {
905
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]);
906
+                } elseif ($tokens[$i + 2] == "&" && $tokens[$i + 3][0] == T_STRING) {
907
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]);
908 908
                 }
909
-            } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) {
910
-                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
909
+            } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i + 2][0] != T_FUNCTION) {
910
+                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1);
911 911
             }
912 912
         }
913 913
     }
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
      */
921 921
     protected function hasProperty($property, ClassMetadataInfo $metadata)
922 922
     {
923
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
923
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
924 924
             // don't generate property if its already on the base class.
925 925
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
926 926
             if ($reflClass->hasProperty($property)) {
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
      */
950 950
     protected function hasMethod($method, ClassMetadataInfo $metadata)
951 951
     {
952
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
952
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
953 953
             // don't generate method if its already on the base class.
954 954
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
955 955
 
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
      */
979 979
     protected function getTraits(ClassMetadataInfo $metadata)
980 980
     {
981
-        if (! ($metadata->reflClass !== null || class_exists($metadata->name))) {
981
+        if ( ! ($metadata->reflClass !== null || class_exists($metadata->name))) {
982 982
             return [];
983 983
         }
984 984
 
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
     {
1031 1031
         $refl = new \ReflectionClass($this->getClassToExtend());
1032 1032
 
1033
-        return '\\' . $refl->getName();
1033
+        return '\\'.$refl->getName();
1034 1034
     }
1035 1035
 
1036 1036
     /**
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
     {
1064 1064
         $lines = array();
1065 1065
         $lines[] = '/**';
1066
-        $lines[] = ' * ' . $this->getClassName($metadata);
1066
+        $lines[] = ' * '.$this->getClassName($metadata);
1067 1067
 
1068 1068
         if ($this->generateAnnotations) {
1069 1069
             $lines[] = ' *';
@@ -1078,12 +1078,12 @@  discard block
 block discarded – undo
1078 1078
 
1079 1079
             foreach ($methods as $method) {
1080 1080
                 if ($code = $this->$method($metadata)) {
1081
-                    $lines[] = ' * ' . $code;
1081
+                    $lines[] = ' * '.$code;
1082 1082
                 }
1083 1083
             }
1084 1084
 
1085 1085
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
1086
-                $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';
1086
+                $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks';
1087 1087
             }
1088 1088
         }
1089 1089
 
@@ -1099,17 +1099,17 @@  discard block
 block discarded – undo
1099 1099
      */
1100 1100
     protected function generateEntityAnnotation(ClassMetadataInfo $metadata)
1101 1101
     {
1102
-        $prefix = '@' . $this->annotationsPrefix;
1102
+        $prefix = '@'.$this->annotationsPrefix;
1103 1103
 
1104 1104
         if ($metadata->isEmbeddedClass) {
1105
-            return $prefix . 'Embeddable';
1105
+            return $prefix.'Embeddable';
1106 1106
         }
1107 1107
 
1108 1108
         $customRepository = $metadata->customRepositoryClassName
1109
-            ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")'
1109
+            ? '(repositoryClass="'.$metadata->customRepositoryClassName.'")'
1110 1110
             : '';
1111 1111
 
1112
-        return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository;
1112
+        return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository;
1113 1113
     }
1114 1114
 
1115 1115
     /**
@@ -1126,28 +1126,28 @@  discard block
 block discarded – undo
1126 1126
         $table = array();
1127 1127
 
1128 1128
         if (isset($metadata->table['schema'])) {
1129
-            $table[] = 'schema="' . $metadata->table['schema'] . '"';
1129
+            $table[] = 'schema="'.$metadata->table['schema'].'"';
1130 1130
         }
1131 1131
 
1132 1132
         if (isset($metadata->table['name'])) {
1133
-            $table[] = 'name="' . $metadata->table['name'] . '"';
1133
+            $table[] = 'name="'.$metadata->table['name'].'"';
1134 1134
         }
1135 1135
 
1136 1136
         if (isset($metadata->table['options']) && $metadata->table['options']) {
1137
-            $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}';
1137
+            $table[] = 'options={'.$this->exportTableOptions((array) $metadata->table['options']).'}';
1138 1138
         }
1139 1139
 
1140 1140
         if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
1141 1141
             $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
1142
-            $table[] = 'uniqueConstraints={' . $constraints . '}';
1142
+            $table[] = 'uniqueConstraints={'.$constraints.'}';
1143 1143
         }
1144 1144
 
1145 1145
         if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
1146 1146
             $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']);
1147
-            $table[] = 'indexes={' . $constraints . '}';
1147
+            $table[] = 'indexes={'.$constraints.'}';
1148 1148
         }
1149 1149
 
1150
-        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
1150
+        return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')';
1151 1151
     }
1152 1152
 
1153 1153
     /**
@@ -1162,9 +1162,9 @@  discard block
 block discarded – undo
1162 1162
         foreach ($constraints as $name => $constraint) {
1163 1163
             $columns = array();
1164 1164
             foreach ($constraint['columns'] as $column) {
1165
-                $columns[] = '"' . $column . '"';
1165
+                $columns[] = '"'.$column.'"';
1166 1166
             }
1167
-            $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
1167
+            $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})';
1168 1168
         }
1169 1169
 
1170 1170
         return implode(', ', $annotations);
@@ -1178,7 +1178,7 @@  discard block
 block discarded – undo
1178 1178
     protected function generateInheritanceAnnotation($metadata)
1179 1179
     {
1180 1180
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
1181
-            return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1181
+            return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1182 1182
         }
1183 1183
     }
1184 1184
 
@@ -1191,11 +1191,11 @@  discard block
 block discarded – undo
1191 1191
     {
1192 1192
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
1193 1193
             $discrColumn = $metadata->discriminatorColumn;
1194
-            $columnDefinition = 'name="' . $discrColumn['name']
1195
-                . '", type="' . $discrColumn['type']
1196
-                . '", length=' . $discrColumn['length'];
1194
+            $columnDefinition = 'name="'.$discrColumn['name']
1195
+                . '", type="'.$discrColumn['type']
1196
+                . '", length='.$discrColumn['length'];
1197 1197
 
1198
-            return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
1198
+            return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')';
1199 1199
         }
1200 1200
     }
1201 1201
 
@@ -1210,10 +1210,10 @@  discard block
 block discarded – undo
1210 1210
             $inheritanceClassMap = array();
1211 1211
 
1212 1212
             foreach ($metadata->discriminatorMap as $type => $class) {
1213
-                $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
1213
+                $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"';
1214 1214
             }
1215 1215
 
1216
-            return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
1216
+            return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})';
1217 1217
         }
1218 1218
     }
1219 1219
 
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
             if (( ! isset($fieldMapping['id']) ||
1237 1237
                     ! $fieldMapping['id'] ||
1238 1238
                     $metadata->generatorType == ClassMetadataInfo::GENERATOR_TYPE_NONE
1239
-                ) && (! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1239
+                ) && ( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1240 1240
             ) {
1241 1241
                 if ($code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'])) {
1242 1242
                     $methods[] = $code;
@@ -1308,7 +1308,7 @@  discard block
 block discarded – undo
1308 1308
         }
1309 1309
 
1310 1310
         foreach ($joinColumns as $joinColumn) {
1311
-            if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) {
1311
+            if (isset($joinColumn['nullable']) && ! $joinColumn['nullable']) {
1312 1312
                 return false;
1313 1313
             }
1314 1314
         }
@@ -1355,8 +1355,8 @@  discard block
 block discarded – undo
1355 1355
             }
1356 1356
 
1357 1357
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1358
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1359
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1358
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$associationMapping['fieldName']
1359
+                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null).";\n";
1360 1360
         }
1361 1361
 
1362 1362
         return implode("\n", $lines);
@@ -1383,8 +1383,8 @@  discard block
 block discarded – undo
1383 1383
             }
1384 1384
 
1385 1385
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1386
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
1387
-                     . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1386
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldMapping['fieldName']
1387
+                     . (isset($fieldMapping['options']['default']) ? ' = '.var_export($fieldMapping['options']['default'], true) : null).";\n";
1388 1388
         }
1389 1389
 
1390 1390
         return implode("\n", $lines);
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
             }
1406 1406
 
1407 1407
             $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass);
1408
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n";
1408
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.";\n";
1409 1409
         }
1410 1410
 
1411 1411
         return implode("\n", $lines);
@@ -1420,9 +1420,9 @@  discard block
 block discarded – undo
1420 1420
      *
1421 1421
      * @return string
1422 1422
      */
1423
-    protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null,  $defaultValue = null)
1423
+    protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null)
1424 1424
     {
1425
-        $methodName = $type . Inflector::classify($fieldName);
1425
+        $methodName = $type.Inflector::classify($fieldName);
1426 1426
         $variableName = Inflector::camelize($fieldName);
1427 1427
         if (in_array($type, array("add", "remove"))) {
1428 1428
             $methodName = Inflector::singularize($methodName);
@@ -1442,8 +1442,8 @@  discard block
 block discarded – undo
1442 1442
         $variableType   = $typeHint ? $this->getType($typeHint) : null;
1443 1443
 
1444 1444
         if ($typeHint && ! isset($types[$typeHint])) {
1445
-            $variableType   =  '\\' . ltrim($variableType, '\\');
1446
-            $methodTypeHint =  '\\' . $typeHint . ' ';
1445
+            $variableType   = '\\'.ltrim($variableType, '\\');
1446
+            $methodTypeHint = '\\'.$typeHint.' ';
1447 1447
         }
1448 1448
 
1449 1449
         $methodReturnType = null;
@@ -1457,13 +1457,13 @@  discard block
 block discarded – undo
1457 1457
         }
1458 1458
 
1459 1459
         $replacements = array(
1460
-          '<description>'       => ucfirst($type) . ' ' . $variableName,
1460
+          '<description>'       => ucfirst($type).' '.$variableName,
1461 1461
           '<methodTypeHint>'    => $methodTypeHint,
1462 1462
           '<variableType>'      => $variableType,
1463 1463
           '<variableName>'      => $variableName,
1464 1464
           '<methodName>'        => $methodName,
1465 1465
           '<fieldName>'         => $fieldName,
1466
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1466
+          '<variableDefault>'   => ($defaultValue !== null) ? (' = '.$defaultValue) : '',
1467 1467
           '<entity>'            => $this->getClassName($metadata),
1468 1468
           '<methodTypeReturn>'  => $methodReturnType,
1469 1469
         );
@@ -1492,7 +1492,7 @@  discard block
 block discarded – undo
1492 1492
         $this->staticReflection[$metadata->name]['methods'][] = $methodName;
1493 1493
 
1494 1494
         $replacements = array(
1495
-            '<name>'        => $this->annotationsPrefix . ucfirst($name),
1495
+            '<name>'        => $this->annotationsPrefix.ucfirst($name),
1496 1496
             '<methodName>'  => $methodName,
1497 1497
         );
1498 1498
 
@@ -1515,30 +1515,30 @@  discard block
 block discarded – undo
1515 1515
         $joinColumnAnnot = array();
1516 1516
 
1517 1517
         if (isset($joinColumn['name'])) {
1518
-            $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"';
1518
+            $joinColumnAnnot[] = 'name="'.$joinColumn['name'].'"';
1519 1519
         }
1520 1520
 
1521 1521
         if (isset($joinColumn['referencedColumnName'])) {
1522
-            $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"';
1522
+            $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn['referencedColumnName'].'"';
1523 1523
         }
1524 1524
 
1525 1525
         if (isset($joinColumn['unique']) && $joinColumn['unique']) {
1526
-            $joinColumnAnnot[] = 'unique=' . ($joinColumn['unique'] ? 'true' : 'false');
1526
+            $joinColumnAnnot[] = 'unique='.($joinColumn['unique'] ? 'true' : 'false');
1527 1527
         }
1528 1528
 
1529 1529
         if (isset($joinColumn['nullable'])) {
1530
-            $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false');
1530
+            $joinColumnAnnot[] = 'nullable='.($joinColumn['nullable'] ? 'true' : 'false');
1531 1531
         }
1532 1532
 
1533 1533
         if (isset($joinColumn['onDelete'])) {
1534
-            $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"');
1534
+            $joinColumnAnnot[] = 'onDelete="'.($joinColumn['onDelete'].'"');
1535 1535
         }
1536 1536
 
1537 1537
         if (isset($joinColumn['columnDefinition'])) {
1538
-            $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"';
1538
+            $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn['columnDefinition'].'"';
1539 1539
         }
1540 1540
 
1541
-        return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
1541
+        return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')';
1542 1542
     }
1543 1543
 
1544 1544
     /**
@@ -1550,22 +1550,22 @@  discard block
 block discarded – undo
1550 1550
     protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata)
1551 1551
     {
1552 1552
         $lines = array();
1553
-        $lines[] = $this->spaces . '/**';
1553
+        $lines[] = $this->spaces.'/**';
1554 1554
 
1555 1555
         if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
1556
-            $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection';
1556
+            $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection';
1557 1557
         } else {
1558
-            $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\');
1558
+            $lines[] = $this->spaces.' * @var \\'.ltrim($associationMapping['targetEntity'], '\\');
1559 1559
         }
1560 1560
 
1561 1561
         if ($this->generateAnnotations) {
1562
-            $lines[] = $this->spaces . ' *';
1562
+            $lines[] = $this->spaces.' *';
1563 1563
 
1564 1564
             if (isset($associationMapping['id']) && $associationMapping['id']) {
1565
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1565
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1566 1566
 
1567 1567
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1568
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1568
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1569 1569
                 }
1570 1570
             }
1571 1571
 
@@ -1587,15 +1587,15 @@  discard block
 block discarded – undo
1587 1587
             $typeOptions = array();
1588 1588
 
1589 1589
             if (isset($associationMapping['targetEntity'])) {
1590
-                $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"';
1590
+                $typeOptions[] = 'targetEntity="'.$associationMapping['targetEntity'].'"';
1591 1591
             }
1592 1592
 
1593 1593
             if (isset($associationMapping['inversedBy'])) {
1594
-                $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"';
1594
+                $typeOptions[] = 'inversedBy="'.$associationMapping['inversedBy'].'"';
1595 1595
             }
1596 1596
 
1597 1597
             if (isset($associationMapping['mappedBy'])) {
1598
-                $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"';
1598
+                $typeOptions[] = 'mappedBy="'.$associationMapping['mappedBy'].'"';
1599 1599
             }
1600 1600
 
1601 1601
             if ($associationMapping['cascade']) {
@@ -1611,11 +1611,11 @@  discard block
 block discarded – undo
1611 1611
                     $cascades = array('"all"');
1612 1612
                 }
1613 1613
 
1614
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
1614
+                $typeOptions[] = 'cascade={'.implode(',', $cascades).'}';
1615 1615
             }
1616 1616
 
1617 1617
             if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) {
1618
-                $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false');
1618
+                $typeOptions[] = 'orphanRemoval='.($associationMapping['orphanRemoval'] ? 'true' : 'false');
1619 1619
             }
1620 1620
 
1621 1621
             if (isset($associationMapping['fetch']) && $associationMapping['fetch'] !== ClassMetadataInfo::FETCH_LAZY) {
@@ -1624,71 +1624,71 @@  discard block
 block discarded – undo
1624 1624
                     ClassMetadataInfo::FETCH_EAGER      => 'EAGER',
1625 1625
                 );
1626 1626
 
1627
-                $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"';
1627
+                $typeOptions[] = 'fetch="'.$fetchMap[$associationMapping['fetch']].'"';
1628 1628
             }
1629 1629
 
1630
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
1630
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')';
1631 1631
 
1632 1632
             if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) {
1633
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({';
1633
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({';
1634 1634
 
1635 1635
                 $joinColumnsLines = array();
1636 1636
 
1637 1637
                 foreach ($associationMapping['joinColumns'] as $joinColumn) {
1638 1638
                     if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) {
1639
-                        $joinColumnsLines[] = $this->spaces . ' *   ' . $joinColumnAnnot;
1639
+                        $joinColumnsLines[] = $this->spaces.' *   '.$joinColumnAnnot;
1640 1640
                     }
1641 1641
                 }
1642 1642
 
1643 1643
                 $lines[] = implode(",\n", $joinColumnsLines);
1644
-                $lines[] = $this->spaces . ' * })';
1644
+                $lines[] = $this->spaces.' * })';
1645 1645
             }
1646 1646
 
1647 1647
             if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) {
1648 1648
                 $joinTable = array();
1649
-                $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"';
1649
+                $joinTable[] = 'name="'.$associationMapping['joinTable']['name'].'"';
1650 1650
 
1651 1651
                 if (isset($associationMapping['joinTable']['schema'])) {
1652
-                    $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"';
1652
+                    $joinTable[] = 'schema="'.$associationMapping['joinTable']['schema'].'"';
1653 1653
                 }
1654 1654
 
1655
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ',';
1656
-                $lines[] = $this->spaces . ' *   joinColumns={';
1655
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTable).',';
1656
+                $lines[] = $this->spaces.' *   joinColumns={';
1657 1657
 
1658 1658
                 $joinColumnsLines = array();
1659 1659
 
1660 1660
                 foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) {
1661
-                    $joinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1661
+                    $joinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1662 1662
                 }
1663 1663
 
1664
-                $lines[] = implode(",". PHP_EOL, $joinColumnsLines);
1665
-                $lines[] = $this->spaces . ' *   },';
1666
-                $lines[] = $this->spaces . ' *   inverseJoinColumns={';
1664
+                $lines[] = implode(",".PHP_EOL, $joinColumnsLines);
1665
+                $lines[] = $this->spaces.' *   },';
1666
+                $lines[] = $this->spaces.' *   inverseJoinColumns={';
1667 1667
 
1668 1668
                 $inverseJoinColumnsLines = array();
1669 1669
 
1670 1670
                 foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) {
1671
-                    $inverseJoinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1671
+                    $inverseJoinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1672 1672
                 }
1673 1673
 
1674
-                $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines);
1675
-                $lines[] = $this->spaces . ' *   }';
1676
-                $lines[] = $this->spaces . ' * )';
1674
+                $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines);
1675
+                $lines[] = $this->spaces.' *   }';
1676
+                $lines[] = $this->spaces.' * )';
1677 1677
             }
1678 1678
 
1679 1679
             if (isset($associationMapping['orderBy'])) {
1680
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({';
1680
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({';
1681 1681
 
1682 1682
                 foreach ($associationMapping['orderBy'] as $name => $direction) {
1683
-                    $lines[] = $this->spaces . ' *     "' . $name . '"="' . $direction . '",';
1683
+                    $lines[] = $this->spaces.' *     "'.$name.'"="'.$direction.'",';
1684 1684
                 }
1685 1685
 
1686 1686
                 $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1);
1687
-                $lines[] = $this->spaces . ' * })';
1687
+                $lines[] = $this->spaces.' * })';
1688 1688
             }
1689 1689
         }
1690 1690
 
1691
-        $lines[] = $this->spaces . ' */';
1691
+        $lines[] = $this->spaces.' */';
1692 1692
 
1693 1693
         return implode("\n", $lines);
1694 1694
     }
@@ -1702,35 +1702,35 @@  discard block
 block discarded – undo
1702 1702
     protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadataInfo $metadata)
1703 1703
     {
1704 1704
         $lines = array();
1705
-        $lines[] = $this->spaces . '/**';
1706
-        $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']);
1705
+        $lines[] = $this->spaces.'/**';
1706
+        $lines[] = $this->spaces.' * @var '.$this->getType($fieldMapping['type']);
1707 1707
 
1708 1708
         if ($this->generateAnnotations) {
1709
-            $lines[] = $this->spaces . ' *';
1709
+            $lines[] = $this->spaces.' *';
1710 1710
 
1711 1711
             $column = array();
1712 1712
             if (isset($fieldMapping['columnName'])) {
1713
-                $column[] = 'name="' . $fieldMapping['columnName'] . '"';
1713
+                $column[] = 'name="'.$fieldMapping['columnName'].'"';
1714 1714
             }
1715 1715
 
1716 1716
             if (isset($fieldMapping['type'])) {
1717
-                $column[] = 'type="' . $fieldMapping['type'] . '"';
1717
+                $column[] = 'type="'.$fieldMapping['type'].'"';
1718 1718
             }
1719 1719
 
1720 1720
             if (isset($fieldMapping['length'])) {
1721
-                $column[] = 'length=' . $fieldMapping['length'];
1721
+                $column[] = 'length='.$fieldMapping['length'];
1722 1722
             }
1723 1723
 
1724 1724
             if (isset($fieldMapping['precision'])) {
1725
-                $column[] = 'precision=' .  $fieldMapping['precision'];
1725
+                $column[] = 'precision='.$fieldMapping['precision'];
1726 1726
             }
1727 1727
 
1728 1728
             if (isset($fieldMapping['scale'])) {
1729
-                $column[] = 'scale=' . $fieldMapping['scale'];
1729
+                $column[] = 'scale='.$fieldMapping['scale'];
1730 1730
             }
1731 1731
 
1732 1732
             if (isset($fieldMapping['nullable'])) {
1733
-                $column[] = 'nullable=' .  var_export($fieldMapping['nullable'], true);
1733
+                $column[] = 'nullable='.var_export($fieldMapping['nullable'], true);
1734 1734
             }
1735 1735
 
1736 1736
             $options = [];
@@ -1744,47 +1744,47 @@  discard block
 block discarded – undo
1744 1744
             }
1745 1745
 
1746 1746
             if (isset($fieldMapping['columnDefinition'])) {
1747
-                $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"';
1747
+                $column[] = 'columnDefinition="'.$fieldMapping['columnDefinition'].'"';
1748 1748
             }
1749 1749
 
1750 1750
             if (isset($fieldMapping['unique'])) {
1751
-                $column[] = 'unique=' . var_export($fieldMapping['unique'], true);
1751
+                $column[] = 'unique='.var_export($fieldMapping['unique'], true);
1752 1752
             }
1753 1753
 
1754
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
1754
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')';
1755 1755
 
1756 1756
             if (isset($fieldMapping['id']) && $fieldMapping['id']) {
1757
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1757
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1758 1758
 
1759 1759
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1760
-                    $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1760
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1761 1761
                 }
1762 1762
 
1763 1763
                 if ($metadata->sequenceGeneratorDefinition) {
1764 1764
                     $sequenceGenerator = array();
1765 1765
 
1766 1766
                     if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) {
1767
-                        $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"';
1767
+                        $sequenceGenerator[] = 'sequenceName="'.$metadata->sequenceGeneratorDefinition['sequenceName'].'"';
1768 1768
                     }
1769 1769
 
1770 1770
                     if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) {
1771
-                        $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize'];
1771
+                        $sequenceGenerator[] = 'allocationSize='.$metadata->sequenceGeneratorDefinition['allocationSize'];
1772 1772
                     }
1773 1773
 
1774 1774
                     if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) {
1775
-                        $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue'];
1775
+                        $sequenceGenerator[] = 'initialValue='.$metadata->sequenceGeneratorDefinition['initialValue'];
1776 1776
                     }
1777 1777
 
1778
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')';
1778
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $sequenceGenerator).')';
1779 1779
                 }
1780 1780
             }
1781 1781
 
1782 1782
             if (isset($fieldMapping['version']) && $fieldMapping['version']) {
1783
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version';
1783
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version';
1784 1784
             }
1785 1785
         }
1786 1786
 
1787
-        $lines[] = $this->spaces . ' */';
1787
+        $lines[] = $this->spaces.' */';
1788 1788
 
1789 1789
         return implode("\n", $lines);
1790 1790
     }
@@ -1797,23 +1797,23 @@  discard block
 block discarded – undo
1797 1797
     protected function generateEmbeddedPropertyDocBlock(array $embeddedClass)
1798 1798
     {
1799 1799
         $lines = array();
1800
-        $lines[] = $this->spaces . '/**';
1801
-        $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\');
1800
+        $lines[] = $this->spaces.'/**';
1801
+        $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\');
1802 1802
 
1803 1803
         if ($this->generateAnnotations) {
1804
-            $lines[] = $this->spaces . ' *';
1804
+            $lines[] = $this->spaces.' *';
1805 1805
 
1806
-            $embedded = array('class="' . $embeddedClass['class'] . '"');
1806
+            $embedded = array('class="'.$embeddedClass['class'].'"');
1807 1807
 
1808 1808
             if (isset($fieldMapping['columnPrefix'])) {
1809
-                $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true);
1809
+                $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true);
1810 1810
             }
1811 1811
 
1812
-            $lines[] = $this->spaces . ' * @' .
1813
-                $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')';
1812
+            $lines[] = $this->spaces.' * @'.
1813
+                $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')';
1814 1814
         }
1815 1815
 
1816
-        $lines[] = $this->spaces . ' */';
1816
+        $lines[] = $this->spaces.' */';
1817 1817
 
1818 1818
         return implode("\n", $lines);
1819 1819
     }
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
 
1831 1831
         foreach ($lines as $key => $value) {
1832 1832
             if ( ! empty($value)) {
1833
-                $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
1833
+                $lines[$key] = str_repeat($this->spaces, $num).$lines[$key];
1834 1834
             }
1835 1835
         }
1836 1836
 
@@ -1898,9 +1898,9 @@  discard block
 block discarded – undo
1898 1898
 
1899 1899
         foreach ($options as $name => $option) {
1900 1900
             if (is_array($option)) {
1901
-                $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}';
1901
+                $optionsStr[] = '"'.$name.'"={'.$this->exportTableOptions($option).'}';
1902 1902
             } else {
1903
-                $optionsStr[] = '"' . $name . '"="' . (string) $option . '"';
1903
+                $optionsStr[] = '"'.$name.'"="'.(string) $option.'"';
1904 1904
             }
1905 1905
         }
1906 1906
 
@@ -1923,7 +1923,7 @@  discard block
 block discarded – undo
1923 1923
         if ('get' === $type) {
1924 1924
             if (
1925 1925
                 $metadata->isSingleValuedAssociation($fieldName) ||
1926
-                (!$metadata->hasAssociation($fieldName) && $metadata->isNullable($fieldName))
1926
+                ( ! $metadata->hasAssociation($fieldName) && $metadata->isNullable($fieldName))
1927 1927
             ) {
1928 1928
                 return null;
1929 1929
             }
Please login to merge, or discard this patch.