@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | */ |
341 | 341 | public function __construct() |
342 | 342 | { |
343 | - @trigger_error(self::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); |
|
343 | + @trigger_error(self::class.' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED); |
|
344 | 344 | |
345 | 345 | if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) { |
346 | 346 | $this->annotationsPrefix = 'ORM\\'; |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | */ |
375 | 375 | public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory) |
376 | 376 | { |
377 | - $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension; |
|
377 | + $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name).$this->extension; |
|
378 | 378 | $dir = dirname($path); |
379 | 379 | |
380 | 380 | if ( ! is_dir($dir)) { |
@@ -390,8 +390,8 @@ discard block |
||
390 | 390 | } |
391 | 391 | |
392 | 392 | if ($this->backupExisting && file_exists($path)) { |
393 | - $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~"; |
|
394 | - if (!copy($path, $backupPath)) { |
|
393 | + $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~"; |
|
394 | + if ( ! copy($path, $backupPath)) { |
|
395 | 395 | throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed."); |
396 | 396 | } |
397 | 397 | } |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $body = str_replace('<spaces>', $this->spaces, $body); |
453 | 453 | $last = strrpos($currentCode, '}'); |
454 | 454 | |
455 | - return substr($currentCode, 0, $last) . $body . ($body ? "\n" : '') . "}\n"; |
|
455 | + return substr($currentCode, 0, $last).$body.($body ? "\n" : '')."}\n"; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | /** |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | public function setFieldVisibility($visibility) |
517 | 517 | { |
518 | 518 | if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) { |
519 | - throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility); |
|
519 | + throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility); |
|
520 | 520 | } |
521 | 521 | |
522 | 522 | $this->fieldVisibility = $visibility; |
@@ -613,11 +613,11 @@ discard block |
||
613 | 613 | */ |
614 | 614 | protected function generateEntityNamespace(ClassMetadataInfo $metadata) |
615 | 615 | { |
616 | - if (! $this->hasNamespace($metadata)) { |
|
616 | + if ( ! $this->hasNamespace($metadata)) { |
|
617 | 617 | return ''; |
618 | 618 | } |
619 | 619 | |
620 | - return 'namespace ' . $this->getNamespace($metadata) .';'; |
|
620 | + return 'namespace '.$this->getNamespace($metadata).';'; |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | /** |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | */ |
626 | 626 | protected function generateEntityUse() |
627 | 627 | { |
628 | - if (! $this->generateAnnotations) { |
|
628 | + if ( ! $this->generateAnnotations) { |
|
629 | 629 | return ''; |
630 | 630 | } |
631 | 631 | |
@@ -639,8 +639,8 @@ discard block |
||
639 | 639 | */ |
640 | 640 | protected function generateEntityClassName(ClassMetadataInfo $metadata) |
641 | 641 | { |
642 | - return 'class ' . $this->getClassName($metadata) . |
|
643 | - ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null); |
|
642 | + return 'class '.$this->getClassName($metadata). |
|
643 | + ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null); |
|
644 | 644 | } |
645 | 645 | |
646 | 646 | /** |
@@ -742,13 +742,13 @@ discard block |
||
742 | 742 | $fieldMappings = array_merge($requiredFields, $optionalFields); |
743 | 743 | |
744 | 744 | foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) { |
745 | - $paramType = '\\' . ltrim($embeddedClass['class'], '\\'); |
|
746 | - $paramVariable = '$' . $fieldName; |
|
745 | + $paramType = '\\'.ltrim($embeddedClass['class'], '\\'); |
|
746 | + $paramVariable = '$'.$fieldName; |
|
747 | 747 | |
748 | 748 | $paramTypes[] = $paramType; |
749 | 749 | $paramVariables[] = $paramVariable; |
750 | - $params[] = $paramType . ' ' . $paramVariable; |
|
751 | - $fields[] = '$this->' . $fieldName . ' = ' . $paramVariable . ';'; |
|
750 | + $params[] = $paramType.' '.$paramVariable; |
|
751 | + $fields[] = '$this->'.$fieldName.' = '.$paramVariable.';'; |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | foreach ($fieldMappings as $fieldMapping) { |
@@ -756,27 +756,27 @@ discard block |
||
756 | 756 | continue; |
757 | 757 | } |
758 | 758 | |
759 | - $paramTypes[] = $this->getType($fieldMapping['type']) . (!empty($fieldMapping['nullable']) ? '|null' : ''); |
|
760 | - $param = '$' . $fieldMapping['fieldName']; |
|
759 | + $paramTypes[] = $this->getType($fieldMapping['type']).( ! empty($fieldMapping['nullable']) ? '|null' : ''); |
|
760 | + $param = '$'.$fieldMapping['fieldName']; |
|
761 | 761 | $paramVariables[] = $param; |
762 | 762 | |
763 | 763 | if ($fieldMapping['type'] === 'datetime') { |
764 | - $param = $this->getType($fieldMapping['type']) . ' ' . $param; |
|
764 | + $param = $this->getType($fieldMapping['type']).' '.$param; |
|
765 | 765 | } |
766 | 766 | |
767 | - if (!empty($fieldMapping['nullable'])) { |
|
767 | + if ( ! empty($fieldMapping['nullable'])) { |
|
768 | 768 | $param .= ' = null'; |
769 | 769 | } |
770 | 770 | |
771 | 771 | $params[] = $param; |
772 | 772 | |
773 | - $fields[] = '$this->' . $fieldMapping['fieldName'] . ' = $' . $fieldMapping['fieldName'] . ';'; |
|
773 | + $fields[] = '$this->'.$fieldMapping['fieldName'].' = $'.$fieldMapping['fieldName'].';'; |
|
774 | 774 | } |
775 | 775 | |
776 | 776 | $maxParamTypeLength = max(array_map('strlen', $paramTypes)); |
777 | 777 | $paramTags = array_map( |
778 | - function ($type, $variable) use ($maxParamTypeLength) { |
|
779 | - return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable; |
|
778 | + function($type, $variable) use ($maxParamTypeLength) { |
|
779 | + return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable; |
|
780 | 780 | }, |
781 | 781 | $paramTypes, |
782 | 782 | $paramVariables |
@@ -784,8 +784,8 @@ discard block |
||
784 | 784 | |
785 | 785 | // Generate multi line constructor if the signature exceeds 120 characters. |
786 | 786 | if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) { |
787 | - $delimiter = "\n" . $this->spaces; |
|
788 | - $params = $delimiter . implode(',' . $delimiter, $params) . "\n"; |
|
787 | + $delimiter = "\n".$this->spaces; |
|
788 | + $params = $delimiter.implode(','.$delimiter, $params)."\n"; |
|
789 | 789 | } else { |
790 | 790 | $params = implode(', ', $params); |
791 | 791 | } |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | $replacements = [ |
794 | 794 | '<paramTags>' => implode("\n * ", $paramTags), |
795 | 795 | '<params>' => $params, |
796 | - '<fields>' => implode("\n" . $this->spaces, $fields), |
|
796 | + '<fields>' => implode("\n".$this->spaces, $fields), |
|
797 | 797 | ]; |
798 | 798 | |
799 | 799 | $constructor = str_replace( |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | |
839 | 839 | if ($inClass) { |
840 | 840 | $inClass = false; |
841 | - $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1]; |
|
841 | + $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1]; |
|
842 | 842 | $this->staticReflection[$lastSeenClass]['properties'] = []; |
843 | 843 | $this->staticReflection[$lastSeenClass]['methods'] = []; |
844 | 844 | } |
@@ -846,16 +846,16 @@ discard block |
||
846 | 846 | if (T_NAMESPACE === $token[0]) { |
847 | 847 | $lastSeenNamespace = ''; |
848 | 848 | $inNamespace = true; |
849 | - } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i-1][0]) { |
|
849 | + } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i - 1][0]) { |
|
850 | 850 | $inClass = true; |
851 | 851 | } elseif (T_FUNCTION === $token[0]) { |
852 | - if (T_STRING === $tokens[$i+2][0]) { |
|
853 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]); |
|
854 | - } elseif ($tokens[$i+2] == '&' && T_STRING === $tokens[$i+3][0]) { |
|
855 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]); |
|
852 | + if (T_STRING === $tokens[$i + 2][0]) { |
|
853 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]); |
|
854 | + } elseif ($tokens[$i + 2] == '&' && T_STRING === $tokens[$i + 3][0]) { |
|
855 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]); |
|
856 | 856 | } |
857 | - } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i+2][0]) { |
|
858 | - $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1); |
|
857 | + } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i + 2][0]) { |
|
858 | + $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1); |
|
859 | 859 | } |
860 | 860 | } |
861 | 861 | } |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | */ |
869 | 869 | protected function hasProperty($property, ClassMetadataInfo $metadata) |
870 | 870 | { |
871 | - if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) { |
|
871 | + if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) { |
|
872 | 872 | // don't generate property if its already on the base class. |
873 | 873 | $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name); |
874 | 874 | if ($reflClass->hasProperty($property)) { |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | */ |
898 | 898 | protected function hasMethod($method, ClassMetadataInfo $metadata) |
899 | 899 | { |
900 | - if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) { |
|
900 | + if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) { |
|
901 | 901 | // don't generate method if its already on the base class. |
902 | 902 | $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name); |
903 | 903 | |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | */ |
929 | 929 | protected function getTraits(ClassMetadataInfo $metadata) |
930 | 930 | { |
931 | - if (! ($metadata->reflClass !== null || class_exists($metadata->name))) { |
|
931 | + if ( ! ($metadata->reflClass !== null || class_exists($metadata->name))) { |
|
932 | 932 | return []; |
933 | 933 | } |
934 | 934 | |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | { |
979 | 979 | $refl = new \ReflectionClass($this->getClassToExtend()); |
980 | 980 | |
981 | - return '\\' . $refl->getName(); |
|
981 | + return '\\'.$refl->getName(); |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | /** |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | { |
1012 | 1012 | $lines = []; |
1013 | 1013 | $lines[] = '/**'; |
1014 | - $lines[] = ' * ' . $this->getClassName($metadata); |
|
1014 | + $lines[] = ' * '.$this->getClassName($metadata); |
|
1015 | 1015 | |
1016 | 1016 | if ($this->generateAnnotations) { |
1017 | 1017 | $lines[] = ' *'; |
@@ -1027,12 +1027,12 @@ discard block |
||
1027 | 1027 | |
1028 | 1028 | foreach ($methods as $method) { |
1029 | 1029 | if ($code = $this->$method($metadata)) { |
1030 | - $lines[] = ' * ' . $code; |
|
1030 | + $lines[] = ' * '.$code; |
|
1031 | 1031 | } |
1032 | 1032 | } |
1033 | 1033 | |
1034 | 1034 | if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) { |
1035 | - $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks'; |
|
1035 | + $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks'; |
|
1036 | 1036 | } |
1037 | 1037 | } |
1038 | 1038 | |
@@ -1048,17 +1048,17 @@ discard block |
||
1048 | 1048 | */ |
1049 | 1049 | protected function generateEntityAnnotation(ClassMetadataInfo $metadata) |
1050 | 1050 | { |
1051 | - $prefix = '@' . $this->annotationsPrefix; |
|
1051 | + $prefix = '@'.$this->annotationsPrefix; |
|
1052 | 1052 | |
1053 | 1053 | if ($metadata->isEmbeddedClass) { |
1054 | - return $prefix . 'Embeddable'; |
|
1054 | + return $prefix.'Embeddable'; |
|
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | $customRepository = $metadata->customRepositoryClassName |
1058 | - ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")' |
|
1058 | + ? '(repositoryClass="'.$metadata->customRepositoryClassName.'")' |
|
1059 | 1059 | : ''; |
1060 | 1060 | |
1061 | - return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository; |
|
1061 | + return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository; |
|
1062 | 1062 | } |
1063 | 1063 | |
1064 | 1064 | /** |
@@ -1075,28 +1075,28 @@ discard block |
||
1075 | 1075 | $table = []; |
1076 | 1076 | |
1077 | 1077 | if (isset($metadata->table['schema'])) { |
1078 | - $table[] = 'schema="' . $metadata->table['schema'] . '"'; |
|
1078 | + $table[] = 'schema="'.$metadata->table['schema'].'"'; |
|
1079 | 1079 | } |
1080 | 1080 | |
1081 | 1081 | if (isset($metadata->table['name'])) { |
1082 | - $table[] = 'name="' . $metadata->table['name'] . '"'; |
|
1082 | + $table[] = 'name="'.$metadata->table['name'].'"'; |
|
1083 | 1083 | } |
1084 | 1084 | |
1085 | 1085 | if (isset($metadata->table['options']) && $metadata->table['options']) { |
1086 | - $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}'; |
|
1086 | + $table[] = 'options={'.$this->exportTableOptions((array) $metadata->table['options']).'}'; |
|
1087 | 1087 | } |
1088 | 1088 | |
1089 | 1089 | if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) { |
1090 | 1090 | $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']); |
1091 | - $table[] = 'uniqueConstraints={' . $constraints . '}'; |
|
1091 | + $table[] = 'uniqueConstraints={'.$constraints.'}'; |
|
1092 | 1092 | } |
1093 | 1093 | |
1094 | 1094 | if (isset($metadata->table['indexes']) && $metadata->table['indexes']) { |
1095 | 1095 | $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']); |
1096 | - $table[] = 'indexes={' . $constraints . '}'; |
|
1096 | + $table[] = 'indexes={'.$constraints.'}'; |
|
1097 | 1097 | } |
1098 | 1098 | |
1099 | - return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')'; |
|
1099 | + return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')'; |
|
1100 | 1100 | } |
1101 | 1101 | |
1102 | 1102 | /** |
@@ -1111,9 +1111,9 @@ discard block |
||
1111 | 1111 | foreach ($constraints as $name => $constraint) { |
1112 | 1112 | $columns = []; |
1113 | 1113 | foreach ($constraint['columns'] as $column) { |
1114 | - $columns[] = '"' . $column . '"'; |
|
1114 | + $columns[] = '"'.$column.'"'; |
|
1115 | 1115 | } |
1116 | - $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})'; |
|
1116 | + $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})'; |
|
1117 | 1117 | } |
1118 | 1118 | |
1119 | 1119 | return implode(', ', $annotations); |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | return ''; |
1131 | 1131 | } |
1132 | 1132 | |
1133 | - return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")'; |
|
1133 | + return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")'; |
|
1134 | 1134 | } |
1135 | 1135 | |
1136 | 1136 | /** |
@@ -1145,11 +1145,11 @@ discard block |
||
1145 | 1145 | } |
1146 | 1146 | |
1147 | 1147 | $discrColumn = $metadata->discriminatorColumn; |
1148 | - $columnDefinition = 'name="' . $discrColumn['name'] |
|
1149 | - . '", type="' . $discrColumn['type'] |
|
1150 | - . '", length=' . $discrColumn['length']; |
|
1148 | + $columnDefinition = 'name="'.$discrColumn['name'] |
|
1149 | + . '", type="'.$discrColumn['type'] |
|
1150 | + . '", length='.$discrColumn['length']; |
|
1151 | 1151 | |
1152 | - return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')'; |
|
1152 | + return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')'; |
|
1153 | 1153 | } |
1154 | 1154 | |
1155 | 1155 | /** |
@@ -1166,10 +1166,10 @@ discard block |
||
1166 | 1166 | $inheritanceClassMap = []; |
1167 | 1167 | |
1168 | 1168 | foreach ($metadata->discriminatorMap as $type => $class) { |
1169 | - $inheritanceClassMap[] = '"' . $type . '" = "' . $class . '"'; |
|
1169 | + $inheritanceClassMap[] = '"'.$type.'" = "'.$class.'"'; |
|
1170 | 1170 | } |
1171 | 1171 | |
1172 | - return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})'; |
|
1172 | + return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})'; |
|
1173 | 1173 | } |
1174 | 1174 | |
1175 | 1175 | /** |
@@ -1188,8 +1188,8 @@ discard block |
||
1188 | 1188 | |
1189 | 1189 | $nullableField = $this->nullableFieldExpression($fieldMapping); |
1190 | 1190 | |
1191 | - if ((!$metadata->isEmbeddedClass || !$this->embeddablesImmutable) |
|
1192 | - && (!isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_NONE) |
|
1191 | + if (( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable) |
|
1192 | + && ( ! isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_NONE) |
|
1193 | 1193 | && $code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'], $nullableField) |
1194 | 1194 | ) { |
1195 | 1195 | $methods[] = $code; |
@@ -1260,7 +1260,7 @@ discard block |
||
1260 | 1260 | } |
1261 | 1261 | |
1262 | 1262 | foreach ($joinColumns as $joinColumn) { |
1263 | - if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) { |
|
1263 | + if (isset($joinColumn['nullable']) && ! $joinColumn['nullable']) { |
|
1264 | 1264 | return false; |
1265 | 1265 | } |
1266 | 1266 | } |
@@ -1305,8 +1305,8 @@ discard block |
||
1305 | 1305 | } |
1306 | 1306 | |
1307 | 1307 | $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata); |
1308 | - $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName'] |
|
1309 | - . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n"; |
|
1308 | + $lines[] = $this->spaces.$this->fieldVisibility.' $'.$associationMapping['fieldName'] |
|
1309 | + . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null).";\n"; |
|
1310 | 1310 | } |
1311 | 1311 | |
1312 | 1312 | return implode("\n", $lines); |
@@ -1334,12 +1334,12 @@ discard block |
||
1334 | 1334 | if ($fieldMapping['type'] === 'boolean' && $fieldMapping['options']['default'] === '1') { |
1335 | 1335 | $defaultValue = ' = true'; |
1336 | 1336 | } else { |
1337 | - $defaultValue = ' = ' . var_export($fieldMapping['options']['default'], true); |
|
1337 | + $defaultValue = ' = '.var_export($fieldMapping['options']['default'], true); |
|
1338 | 1338 | } |
1339 | 1339 | } |
1340 | 1340 | |
1341 | 1341 | $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata); |
1342 | - $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName'] . $defaultValue . ";\n"; |
|
1342 | + $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldMapping['fieldName'].$defaultValue.";\n"; |
|
1343 | 1343 | } |
1344 | 1344 | |
1345 | 1345 | return implode("\n", $lines); |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | } |
1361 | 1361 | |
1362 | 1362 | $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass); |
1363 | - $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n"; |
|
1363 | + $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.";\n"; |
|
1364 | 1364 | } |
1365 | 1365 | |
1366 | 1366 | return implode("\n", $lines); |
@@ -1377,7 +1377,7 @@ discard block |
||
1377 | 1377 | */ |
1378 | 1378 | protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null) |
1379 | 1379 | { |
1380 | - $methodName = $type . Inflector::classify($fieldName); |
|
1380 | + $methodName = $type.Inflector::classify($fieldName); |
|
1381 | 1381 | $variableName = Inflector::camelize($fieldName); |
1382 | 1382 | if (in_array($type, ["add", "remove"])) { |
1383 | 1383 | $methodName = Inflector::singularize($methodName); |
@@ -1397,18 +1397,18 @@ discard block |
||
1397 | 1397 | $variableType = $typeHint ? $this->getType($typeHint) : null; |
1398 | 1398 | |
1399 | 1399 | if ($typeHint && ! isset($types[$typeHint])) { |
1400 | - $variableType = '\\' . ltrim($variableType, '\\'); |
|
1401 | - $methodTypeHint = '\\' . $typeHint . ' '; |
|
1400 | + $variableType = '\\'.ltrim($variableType, '\\'); |
|
1401 | + $methodTypeHint = '\\'.$typeHint.' '; |
|
1402 | 1402 | } |
1403 | 1403 | |
1404 | 1404 | $replacements = [ |
1405 | - '<description>' => ucfirst($type) . ' ' . $variableName . '.', |
|
1405 | + '<description>' => ucfirst($type).' '.$variableName.'.', |
|
1406 | 1406 | '<methodTypeHint>' => $methodTypeHint, |
1407 | - '<variableType>' => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''), |
|
1407 | + '<variableType>' => $variableType.(null !== $defaultValue ? ('|'.$defaultValue) : ''), |
|
1408 | 1408 | '<variableName>' => $variableName, |
1409 | 1409 | '<methodName>' => $methodName, |
1410 | 1410 | '<fieldName>' => $fieldName, |
1411 | - '<variableDefault>' => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '', |
|
1411 | + '<variableDefault>' => ($defaultValue !== null) ? (' = '.$defaultValue) : '', |
|
1412 | 1412 | '<entity>' => $this->getClassName($metadata) |
1413 | 1413 | ]; |
1414 | 1414 | |
@@ -1437,7 +1437,7 @@ discard block |
||
1437 | 1437 | $this->staticReflection[$metadata->name]['methods'][] = $methodName; |
1438 | 1438 | |
1439 | 1439 | $replacements = [ |
1440 | - '<name>' => $this->annotationsPrefix . ucfirst($name), |
|
1440 | + '<name>' => $this->annotationsPrefix.ucfirst($name), |
|
1441 | 1441 | '<methodName>' => $methodName, |
1442 | 1442 | ]; |
1443 | 1443 | |
@@ -1460,11 +1460,11 @@ discard block |
||
1460 | 1460 | $joinColumnAnnot = []; |
1461 | 1461 | |
1462 | 1462 | if (isset($joinColumn['name'])) { |
1463 | - $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"'; |
|
1463 | + $joinColumnAnnot[] = 'name="'.$joinColumn['name'].'"'; |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | 1466 | if (isset($joinColumn['referencedColumnName'])) { |
1467 | - $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"'; |
|
1467 | + $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn['referencedColumnName'].'"'; |
|
1468 | 1468 | } |
1469 | 1469 | |
1470 | 1470 | if (isset($joinColumn['unique']) && $joinColumn['unique']) { |
@@ -1472,18 +1472,18 @@ discard block |
||
1472 | 1472 | } |
1473 | 1473 | |
1474 | 1474 | if (isset($joinColumn['nullable'])) { |
1475 | - $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false'); |
|
1475 | + $joinColumnAnnot[] = 'nullable='.($joinColumn['nullable'] ? 'true' : 'false'); |
|
1476 | 1476 | } |
1477 | 1477 | |
1478 | 1478 | if (isset($joinColumn['onDelete'])) { |
1479 | - $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"'); |
|
1479 | + $joinColumnAnnot[] = 'onDelete="'.($joinColumn['onDelete'].'"'); |
|
1480 | 1480 | } |
1481 | 1481 | |
1482 | 1482 | if (isset($joinColumn['columnDefinition'])) { |
1483 | - $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"'; |
|
1483 | + $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn['columnDefinition'].'"'; |
|
1484 | 1484 | } |
1485 | 1485 | |
1486 | - return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')'; |
|
1486 | + return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')'; |
|
1487 | 1487 | } |
1488 | 1488 | |
1489 | 1489 | /** |
@@ -1495,22 +1495,22 @@ discard block |
||
1495 | 1495 | protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata) |
1496 | 1496 | { |
1497 | 1497 | $lines = []; |
1498 | - $lines[] = $this->spaces . '/**'; |
|
1498 | + $lines[] = $this->spaces.'/**'; |
|
1499 | 1499 | |
1500 | 1500 | if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) { |
1501 | - $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection'; |
|
1501 | + $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection'; |
|
1502 | 1502 | } else { |
1503 | - $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\'); |
|
1503 | + $lines[] = $this->spaces.' * @var \\'.ltrim($associationMapping['targetEntity'], '\\'); |
|
1504 | 1504 | } |
1505 | 1505 | |
1506 | 1506 | if ($this->generateAnnotations) { |
1507 | - $lines[] = $this->spaces . ' *'; |
|
1507 | + $lines[] = $this->spaces.' *'; |
|
1508 | 1508 | |
1509 | 1509 | if (isset($associationMapping['id']) && $associationMapping['id']) { |
1510 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id'; |
|
1510 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id'; |
|
1511 | 1511 | |
1512 | 1512 | if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) { |
1513 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")'; |
|
1513 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")'; |
|
1514 | 1514 | } |
1515 | 1515 | } |
1516 | 1516 | |
@@ -1532,15 +1532,15 @@ discard block |
||
1532 | 1532 | $typeOptions = []; |
1533 | 1533 | |
1534 | 1534 | if (isset($associationMapping['targetEntity'])) { |
1535 | - $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"'; |
|
1535 | + $typeOptions[] = 'targetEntity="'.$associationMapping['targetEntity'].'"'; |
|
1536 | 1536 | } |
1537 | 1537 | |
1538 | 1538 | if (isset($associationMapping['inversedBy'])) { |
1539 | - $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"'; |
|
1539 | + $typeOptions[] = 'inversedBy="'.$associationMapping['inversedBy'].'"'; |
|
1540 | 1540 | } |
1541 | 1541 | |
1542 | 1542 | if (isset($associationMapping['mappedBy'])) { |
1543 | - $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"'; |
|
1543 | + $typeOptions[] = 'mappedBy="'.$associationMapping['mappedBy'].'"'; |
|
1544 | 1544 | } |
1545 | 1545 | |
1546 | 1546 | if ($associationMapping['cascade']) { |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | $cascades = ['"all"']; |
1557 | 1557 | } |
1558 | 1558 | |
1559 | - $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}'; |
|
1559 | + $typeOptions[] = 'cascade={'.implode(',', $cascades).'}'; |
|
1560 | 1560 | } |
1561 | 1561 | |
1562 | 1562 | if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) { |
@@ -1569,71 +1569,71 @@ discard block |
||
1569 | 1569 | ClassMetadataInfo::FETCH_EAGER => 'EAGER', |
1570 | 1570 | ]; |
1571 | 1571 | |
1572 | - $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"'; |
|
1572 | + $typeOptions[] = 'fetch="'.$fetchMap[$associationMapping['fetch']].'"'; |
|
1573 | 1573 | } |
1574 | 1574 | |
1575 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')'; |
|
1575 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')'; |
|
1576 | 1576 | |
1577 | 1577 | if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) { |
1578 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({'; |
|
1578 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({'; |
|
1579 | 1579 | |
1580 | 1580 | $joinColumnsLines = []; |
1581 | 1581 | |
1582 | 1582 | foreach ($associationMapping['joinColumns'] as $joinColumn) { |
1583 | 1583 | if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) { |
1584 | - $joinColumnsLines[] = $this->spaces . ' * ' . $joinColumnAnnot; |
|
1584 | + $joinColumnsLines[] = $this->spaces.' * '.$joinColumnAnnot; |
|
1585 | 1585 | } |
1586 | 1586 | } |
1587 | 1587 | |
1588 | 1588 | $lines[] = implode(",\n", $joinColumnsLines); |
1589 | - $lines[] = $this->spaces . ' * })'; |
|
1589 | + $lines[] = $this->spaces.' * })'; |
|
1590 | 1590 | } |
1591 | 1591 | |
1592 | 1592 | if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) { |
1593 | 1593 | $joinTable = []; |
1594 | - $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"'; |
|
1594 | + $joinTable[] = 'name="'.$associationMapping['joinTable']['name'].'"'; |
|
1595 | 1595 | |
1596 | 1596 | if (isset($associationMapping['joinTable']['schema'])) { |
1597 | - $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"'; |
|
1597 | + $joinTable[] = 'schema="'.$associationMapping['joinTable']['schema'].'"'; |
|
1598 | 1598 | } |
1599 | 1599 | |
1600 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ','; |
|
1601 | - $lines[] = $this->spaces . ' * joinColumns={'; |
|
1600 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTable).','; |
|
1601 | + $lines[] = $this->spaces.' * joinColumns={'; |
|
1602 | 1602 | |
1603 | 1603 | $joinColumnsLines = []; |
1604 | 1604 | |
1605 | 1605 | foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) { |
1606 | - $joinColumnsLines[] = $this->spaces . ' * ' . $this->generateJoinColumnAnnotation($joinColumn); |
|
1606 | + $joinColumnsLines[] = $this->spaces.' * '.$this->generateJoinColumnAnnotation($joinColumn); |
|
1607 | 1607 | } |
1608 | 1608 | |
1609 | - $lines[] = implode(",". PHP_EOL, $joinColumnsLines); |
|
1610 | - $lines[] = $this->spaces . ' * },'; |
|
1611 | - $lines[] = $this->spaces . ' * inverseJoinColumns={'; |
|
1609 | + $lines[] = implode(",".PHP_EOL, $joinColumnsLines); |
|
1610 | + $lines[] = $this->spaces.' * },'; |
|
1611 | + $lines[] = $this->spaces.' * inverseJoinColumns={'; |
|
1612 | 1612 | |
1613 | 1613 | $inverseJoinColumnsLines = []; |
1614 | 1614 | |
1615 | 1615 | foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) { |
1616 | - $inverseJoinColumnsLines[] = $this->spaces . ' * ' . $this->generateJoinColumnAnnotation($joinColumn); |
|
1616 | + $inverseJoinColumnsLines[] = $this->spaces.' * '.$this->generateJoinColumnAnnotation($joinColumn); |
|
1617 | 1617 | } |
1618 | 1618 | |
1619 | - $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines); |
|
1620 | - $lines[] = $this->spaces . ' * }'; |
|
1621 | - $lines[] = $this->spaces . ' * )'; |
|
1619 | + $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines); |
|
1620 | + $lines[] = $this->spaces.' * }'; |
|
1621 | + $lines[] = $this->spaces.' * )'; |
|
1622 | 1622 | } |
1623 | 1623 | |
1624 | 1624 | if (isset($associationMapping['orderBy'])) { |
1625 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({'; |
|
1625 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({'; |
|
1626 | 1626 | |
1627 | 1627 | foreach ($associationMapping['orderBy'] as $name => $direction) { |
1628 | - $lines[] = $this->spaces . ' * "' . $name . '"="' . $direction . '",'; |
|
1628 | + $lines[] = $this->spaces.' * "'.$name.'"="'.$direction.'",'; |
|
1629 | 1629 | } |
1630 | 1630 | |
1631 | 1631 | $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1); |
1632 | - $lines[] = $this->spaces . ' * })'; |
|
1632 | + $lines[] = $this->spaces.' * })'; |
|
1633 | 1633 | } |
1634 | 1634 | } |
1635 | 1635 | |
1636 | - $lines[] = $this->spaces . ' */'; |
|
1636 | + $lines[] = $this->spaces.' */'; |
|
1637 | 1637 | |
1638 | 1638 | return implode("\n", $lines); |
1639 | 1639 | } |
@@ -1647,43 +1647,43 @@ discard block |
||
1647 | 1647 | protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadataInfo $metadata) |
1648 | 1648 | { |
1649 | 1649 | $lines = []; |
1650 | - $lines[] = $this->spaces . '/**'; |
|
1651 | - $lines[] = $this->spaces . ' * @var ' |
|
1650 | + $lines[] = $this->spaces.'/**'; |
|
1651 | + $lines[] = $this->spaces.' * @var ' |
|
1652 | 1652 | . $this->getType($fieldMapping['type']) |
1653 | 1653 | . ($this->nullableFieldExpression($fieldMapping) ? '|null' : ''); |
1654 | 1654 | |
1655 | 1655 | if ($this->generateAnnotations) { |
1656 | - $lines[] = $this->spaces . ' *'; |
|
1656 | + $lines[] = $this->spaces.' *'; |
|
1657 | 1657 | |
1658 | 1658 | $column = []; |
1659 | 1659 | if (isset($fieldMapping['columnName'])) { |
1660 | - $column[] = 'name="' . $fieldMapping['columnName'] . '"'; |
|
1660 | + $column[] = 'name="'.$fieldMapping['columnName'].'"'; |
|
1661 | 1661 | } |
1662 | 1662 | |
1663 | 1663 | if (isset($fieldMapping['type'])) { |
1664 | - $column[] = 'type="' . $fieldMapping['type'] . '"'; |
|
1664 | + $column[] = 'type="'.$fieldMapping['type'].'"'; |
|
1665 | 1665 | } |
1666 | 1666 | |
1667 | 1667 | if (isset($fieldMapping['length'])) { |
1668 | - $column[] = 'length=' . $fieldMapping['length']; |
|
1668 | + $column[] = 'length='.$fieldMapping['length']; |
|
1669 | 1669 | } |
1670 | 1670 | |
1671 | 1671 | if (isset($fieldMapping['precision'])) { |
1672 | - $column[] = 'precision=' . $fieldMapping['precision']; |
|
1672 | + $column[] = 'precision='.$fieldMapping['precision']; |
|
1673 | 1673 | } |
1674 | 1674 | |
1675 | 1675 | if (isset($fieldMapping['scale'])) { |
1676 | - $column[] = 'scale=' . $fieldMapping['scale']; |
|
1676 | + $column[] = 'scale='.$fieldMapping['scale']; |
|
1677 | 1677 | } |
1678 | 1678 | |
1679 | 1679 | if (isset($fieldMapping['nullable'])) { |
1680 | - $column[] = 'nullable=' . var_export($fieldMapping['nullable'], true); |
|
1680 | + $column[] = 'nullable='.var_export($fieldMapping['nullable'], true); |
|
1681 | 1681 | } |
1682 | 1682 | |
1683 | 1683 | $options = []; |
1684 | 1684 | |
1685 | 1685 | if (isset($fieldMapping['options']['default']) && $fieldMapping['options']['default']) { |
1686 | - $options[] = '"default"="' . $fieldMapping['options']['default'] .'"'; |
|
1686 | + $options[] = '"default"="'.$fieldMapping['options']['default'].'"'; |
|
1687 | 1687 | } |
1688 | 1688 | |
1689 | 1689 | if (isset($fieldMapping['options']['unsigned']) && $fieldMapping['options']['unsigned']) { |
@@ -1695,15 +1695,15 @@ discard block |
||
1695 | 1695 | } |
1696 | 1696 | |
1697 | 1697 | if (isset($fieldMapping['options']['comment']) && $fieldMapping['options']['comment']) { |
1698 | - $options[] = '"comment"="' . str_replace('"', '""', $fieldMapping['options']['comment']) . '"'; |
|
1698 | + $options[] = '"comment"="'.str_replace('"', '""', $fieldMapping['options']['comment']).'"'; |
|
1699 | 1699 | } |
1700 | 1700 | |
1701 | 1701 | if (isset($fieldMapping['options']['collation']) && $fieldMapping['options']['collation']) { |
1702 | - $options[] = '"collation"="' . $fieldMapping['options']['collation'] .'"'; |
|
1702 | + $options[] = '"collation"="'.$fieldMapping['options']['collation'].'"'; |
|
1703 | 1703 | } |
1704 | 1704 | |
1705 | 1705 | if (isset($fieldMapping['options']['check']) && $fieldMapping['options']['check']) { |
1706 | - $options[] = '"check"="' . $fieldMapping['options']['check'] .'"'; |
|
1706 | + $options[] = '"check"="'.$fieldMapping['options']['check'].'"'; |
|
1707 | 1707 | } |
1708 | 1708 | |
1709 | 1709 | if ($options) { |
@@ -1711,47 +1711,47 @@ discard block |
||
1711 | 1711 | } |
1712 | 1712 | |
1713 | 1713 | if (isset($fieldMapping['columnDefinition'])) { |
1714 | - $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"'; |
|
1714 | + $column[] = 'columnDefinition="'.$fieldMapping['columnDefinition'].'"'; |
|
1715 | 1715 | } |
1716 | 1716 | |
1717 | 1717 | if (isset($fieldMapping['unique'])) { |
1718 | - $column[] = 'unique=' . var_export($fieldMapping['unique'], true); |
|
1718 | + $column[] = 'unique='.var_export($fieldMapping['unique'], true); |
|
1719 | 1719 | } |
1720 | 1720 | |
1721 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')'; |
|
1721 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')'; |
|
1722 | 1722 | |
1723 | 1723 | if (isset($fieldMapping['id']) && $fieldMapping['id']) { |
1724 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id'; |
|
1724 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id'; |
|
1725 | 1725 | |
1726 | 1726 | if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) { |
1727 | - $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")'; |
|
1727 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")'; |
|
1728 | 1728 | } |
1729 | 1729 | |
1730 | 1730 | if ($metadata->sequenceGeneratorDefinition) { |
1731 | 1731 | $sequenceGenerator = []; |
1732 | 1732 | |
1733 | 1733 | if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) { |
1734 | - $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"'; |
|
1734 | + $sequenceGenerator[] = 'sequenceName="'.$metadata->sequenceGeneratorDefinition['sequenceName'].'"'; |
|
1735 | 1735 | } |
1736 | 1736 | |
1737 | 1737 | if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) { |
1738 | - $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize']; |
|
1738 | + $sequenceGenerator[] = 'allocationSize='.$metadata->sequenceGeneratorDefinition['allocationSize']; |
|
1739 | 1739 | } |
1740 | 1740 | |
1741 | 1741 | if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) { |
1742 | - $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue']; |
|
1742 | + $sequenceGenerator[] = 'initialValue='.$metadata->sequenceGeneratorDefinition['initialValue']; |
|
1743 | 1743 | } |
1744 | 1744 | |
1745 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')'; |
|
1745 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $sequenceGenerator).')'; |
|
1746 | 1746 | } |
1747 | 1747 | } |
1748 | 1748 | |
1749 | 1749 | if (isset($fieldMapping['version']) && $fieldMapping['version']) { |
1750 | - $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version'; |
|
1750 | + $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version'; |
|
1751 | 1751 | } |
1752 | 1752 | } |
1753 | 1753 | |
1754 | - $lines[] = $this->spaces . ' */'; |
|
1754 | + $lines[] = $this->spaces.' */'; |
|
1755 | 1755 | |
1756 | 1756 | return implode("\n", $lines); |
1757 | 1757 | } |
@@ -1764,27 +1764,27 @@ discard block |
||
1764 | 1764 | protected function generateEmbeddedPropertyDocBlock(array $embeddedClass) |
1765 | 1765 | { |
1766 | 1766 | $lines = []; |
1767 | - $lines[] = $this->spaces . '/**'; |
|
1768 | - $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\'); |
|
1767 | + $lines[] = $this->spaces.'/**'; |
|
1768 | + $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\'); |
|
1769 | 1769 | |
1770 | 1770 | if ($this->generateAnnotations) { |
1771 | - $lines[] = $this->spaces . ' *'; |
|
1771 | + $lines[] = $this->spaces.' *'; |
|
1772 | 1772 | |
1773 | - $embedded = ['class="' . $embeddedClass['class'] . '"']; |
|
1773 | + $embedded = ['class="'.$embeddedClass['class'].'"']; |
|
1774 | 1774 | |
1775 | 1775 | if (isset($embeddedClass['columnPrefix'])) { |
1776 | 1776 | if (is_string($embeddedClass['columnPrefix'])) { |
1777 | - $embedded[] = 'columnPrefix="' . $embeddedClass['columnPrefix'] . '"'; |
|
1777 | + $embedded[] = 'columnPrefix="'.$embeddedClass['columnPrefix'].'"'; |
|
1778 | 1778 | } else { |
1779 | - $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true); |
|
1779 | + $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true); |
|
1780 | 1780 | } |
1781 | 1781 | } |
1782 | 1782 | |
1783 | - $lines[] = $this->spaces . ' * @' . |
|
1784 | - $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')'; |
|
1783 | + $lines[] = $this->spaces.' * @'. |
|
1784 | + $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')'; |
|
1785 | 1785 | } |
1786 | 1786 | |
1787 | - $lines[] = $this->spaces . ' */'; |
|
1787 | + $lines[] = $this->spaces.' */'; |
|
1788 | 1788 | |
1789 | 1789 | return implode("\n", $lines); |
1790 | 1790 | } |
@@ -1798,13 +1798,13 @@ discard block |
||
1798 | 1798 | $processedClasses = []; |
1799 | 1799 | foreach ($metadata->entityListeners as $event => $eventListeners) { |
1800 | 1800 | foreach ($eventListeners as $eventListener) { |
1801 | - $processedClasses[] = '"' . $eventListener['class'] . '"'; |
|
1801 | + $processedClasses[] = '"'.$eventListener['class'].'"'; |
|
1802 | 1802 | } |
1803 | 1803 | } |
1804 | 1804 | |
1805 | 1805 | return \sprintf( |
1806 | 1806 | '%s%s({%s})', |
1807 | - '@' . $this->annotationsPrefix, |
|
1807 | + '@'.$this->annotationsPrefix, |
|
1808 | 1808 | 'EntityListeners', |
1809 | 1809 | \implode(',', \array_unique($processedClasses)) |
1810 | 1810 | ); |
@@ -1822,7 +1822,7 @@ discard block |
||
1822 | 1822 | |
1823 | 1823 | foreach ($lines as $key => $value) { |
1824 | 1824 | if ( ! empty($value)) { |
1825 | - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; |
|
1825 | + $lines[$key] = str_repeat($this->spaces, $num).$lines[$key]; |
|
1826 | 1826 | } |
1827 | 1827 | } |
1828 | 1828 | |
@@ -1904,9 +1904,9 @@ discard block |
||
1904 | 1904 | |
1905 | 1905 | foreach ($options as $name => $option) { |
1906 | 1906 | if (is_array($option)) { |
1907 | - $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}'; |
|
1907 | + $optionsStr[] = '"'.$name.'"={'.$this->exportTableOptions($option).'}'; |
|
1908 | 1908 | } else { |
1909 | - $optionsStr[] = '"' . $name . '"="' . (string) $option . '"'; |
|
1909 | + $optionsStr[] = '"'.$name.'"="'.(string) $option.'"'; |
|
1910 | 1910 | } |
1911 | 1911 | } |
1912 | 1912 |