@@ -54,11 +54,11 @@ |
||
54 | 54 | return $tableMetadata; |
55 | 55 | } |
56 | 56 | |
57 | - if (! empty($this->tableAnnotation->name)) { |
|
57 | + if ( ! empty($this->tableAnnotation->name)) { |
|
58 | 58 | $tableMetadata->setName($this->tableAnnotation->name); |
59 | 59 | } |
60 | 60 | |
61 | - if (! empty($this->tableAnnotation->schema)) { |
|
61 | + if ( ! empty($this->tableAnnotation->schema)) { |
|
62 | 62 | $tableMetadata->setSchema($this->tableAnnotation->schema); |
63 | 63 | } |
64 | 64 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | $componentName = $this->componentMetadata->getRootClassName(); |
63 | 63 | $baseRegion = strtolower(str_replace('\\', '_', $componentName)); |
64 | - $defaultRegion = $baseRegion . ($this->fieldName ? '__' . $this->fieldName : ''); |
|
64 | + $defaultRegion = $baseRegion.($this->fieldName ? '__'.$this->fieldName : ''); |
|
65 | 65 | |
66 | 66 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, strtoupper($this->cacheAnnotation->usage))); |
67 | 67 | $region = $this->cacheAnnotation->region ?: $defaultRegion; |
@@ -65,11 +65,11 @@ |
||
65 | 65 | $discriminatorColumn->setType(Type::getType($annotation->type ?? 'string')); |
66 | 66 | $discriminatorColumn->setColumnName($annotation->name); |
67 | 67 | |
68 | - if (! empty($annotation->columnDefinition)) { |
|
68 | + if ( ! empty($annotation->columnDefinition)) { |
|
69 | 69 | $discriminatorColumn->setColumnDefinition($annotation->columnDefinition); |
70 | 70 | } |
71 | 71 | |
72 | - if (! empty($annotation->length)) { |
|
72 | + if ( ! empty($annotation->length)) { |
|
73 | 73 | $discriminatorColumn->setLength($annotation->length); |
74 | 74 | } |
75 | 75 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function generateProxyClasses(array $classes) : int |
58 | 58 | { |
59 | - $concreteClasses = array_filter($classes, static function (ClassMetadata $metadata) : bool { |
|
59 | + $concreteClasses = array_filter($classes, static function(ClassMetadata $metadata) : bool { |
|
60 | 60 | return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract()); |
61 | 61 | }); |
62 | 62 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ->proxyFactory |
66 | 66 | ->createProxy( |
67 | 67 | $metadata->getClassName(), |
68 | - static function () { |
|
68 | + static function() { |
|
69 | 69 | // empty closure, serves its purpose, for now |
70 | 70 | }, |
71 | 71 | $this->skippedFieldsFqns($metadata) |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ->getUnitOfWork() |
90 | 90 | ->getEntityPersister($metadata->getClassName()); |
91 | 91 | |
92 | - $proxyInstance = $this |
|
92 | + $proxyInstance = $this |
|
93 | 93 | ->proxyFactory |
94 | 94 | ->createProxy( |
95 | 95 | $metadata->getClassName(), |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : Closure |
110 | 110 | { |
111 | - return static function ( |
|
111 | + return static function( |
|
112 | 112 | GhostObjectInterface $ghostObject, |
113 | 113 | string $method, |
114 | 114 | // we don't care |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $identifier = $persister->getIdentifier($ghostObject); |
128 | 128 | |
129 | 129 | // @TODO how do we use `$properties` in the persister? That would be a massive optimisation |
130 | - if (! $persister->loadById($identifier, $ghostObject)) { |
|
130 | + if ( ! $persister->loadById($identifier, $ghostObject)) { |
|
131 | 131 | $initializer = $originalInitializer; |
132 | 132 | |
133 | 133 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $transientFieldsFqns = []; |
160 | 160 | |
161 | 161 | foreach ($metadata->getPropertiesIterator() as $name => $property) { |
162 | - if (! $property instanceof TransientMetadata) { |
|
162 | + if ( ! $property instanceof TransientMetadata) { |
|
163 | 163 | continue; |
164 | 164 | } |
165 | 165 | |
@@ -197,11 +197,11 @@ discard block |
||
197 | 197 | private function propertyFqcn(ReflectionProperty $property) : string |
198 | 198 | { |
199 | 199 | if ($property->isPrivate()) { |
200 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName(); |
|
200 | + return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName(); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | if ($property->isProtected()) { |
204 | - return "\0*\0" . $property->getName(); |
|
204 | + return "\0*\0".$property->getName(); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return $property->getName(); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $normalizedAssociatedId = []; |
36 | 36 | |
37 | 37 | foreach ($targetClass->getPropertiesIterator() as $name => $property) { |
38 | - if (! array_key_exists($name, $flatIdentifier)) { |
|
38 | + if ( ! array_key_exists($name, $flatIdentifier)) { |
|
39 | 39 | continue; |
40 | 40 | } |
41 | 41 |
@@ -58,14 +58,14 @@ |
||
58 | 58 | |
59 | 59 | // iterate over association mappings |
60 | 60 | foreach ($class->getPropertiesIterator() as $association) { |
61 | - if (! ($association instanceof AssociationMetadata)) { |
|
61 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
62 | 62 | continue; |
63 | 63 | } |
64 | 64 | |
65 | 65 | // resolve join columns over to-one or to-many |
66 | 66 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
67 | 67 | |
68 | - if (! $association->isOwningSide()) { |
|
68 | + if ( ! $association->isOwningSide()) { |
|
69 | 69 | $association = $targetClass->getProperty($association->getMappedBy()); |
70 | 70 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
71 | 71 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $ce = []; |
80 | 80 | |
81 | 81 | foreach ($class->getPropertiesIterator() as $fieldName => $association) { |
82 | - if (! ($association instanceof AssociationMetadata)) { |
|
82 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | foreach ($class->getSubClasses() as $subClass) { |
90 | - if (! in_array($class->getClassName(), class_parents($subClass), true)) { |
|
90 | + if ( ! in_array($class->getClassName(), class_parents($subClass), true)) { |
|
91 | 91 | $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance."; |
92 | 92 | |
93 | 93 | $ce[] = sprintf($message, $subClass, $class->getClassName()); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $fieldName = $association->getName(); |
107 | 107 | $targetEntity = $association->getTargetEntity(); |
108 | 108 | |
109 | - if (! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
109 | + if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
110 | 110 | $message = "The target entity '%s' specified on %s#%s is unknown or not an entity."; |
111 | 111 | |
112 | 112 | return [sprintf($message, $targetEntity, $class->getClassName(), $fieldName)]; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | /** @var ClassMetadata $targetMetadata */ |
127 | 127 | $targetMetadata = $metadataFactory->getMetadataFor($targetEntity); |
128 | - $containsForeignId = array_filter($targetMetadata->identifier, static function ($identifier) use ($targetMetadata) { |
|
128 | + $containsForeignId = array_filter($targetMetadata->identifier, static function($identifier) use ($targetMetadata) { |
|
129 | 129 | $targetProperty = $targetMetadata->getProperty($identifier); |
130 | 130 | |
131 | 131 | return $targetProperty instanceof AssociationMetadata; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | /** @var AssociationMetadata $targetAssociation */ |
142 | 142 | $targetAssociation = $targetMetadata->getProperty($mappedBy); |
143 | 143 | |
144 | - if (! $targetAssociation) { |
|
144 | + if ( ! $targetAssociation) { |
|
145 | 145 | $message = 'The association %s#%s refers to the owning side property %s#%s which does not exist.'; |
146 | 146 | |
147 | 147 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | /** @var AssociationMetadata $targetAssociation */ |
166 | 166 | $targetAssociation = $targetMetadata->getProperty($inversedBy); |
167 | 167 | |
168 | - if (! $targetAssociation) { |
|
168 | + if ( ! $targetAssociation) { |
|
169 | 169 | $message = 'The association %s#%s refers to the inverse side property %s#%s which does not exist.'; |
170 | 170 | |
171 | 171 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $joinTable = $association->getJoinTable(); |
210 | 210 | |
211 | 211 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
212 | - if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) { |
|
212 | + if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) { |
|
213 | 213 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
214 | 214 | |
215 | 215 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName()); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
221 | - if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) { |
|
221 | + if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) { |
|
222 | 222 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
223 | 223 | |
224 | 224 | $ce[] = sprintf($message, $inverseJoinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) { |
230 | 230 | $columnNames = array_map( |
231 | - static function (JoinColumnMetadata $joinColumn) { |
|
231 | + static function(JoinColumnMetadata $joinColumn) { |
|
232 | 232 | return $joinColumn->getReferencedColumnName(); |
233 | 233 | }, |
234 | 234 | $joinTable->getInverseJoinColumns() |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) { |
245 | 245 | $columnNames = array_map( |
246 | - static function (JoinColumnMetadata $joinColumn) { |
|
246 | + static function(JoinColumnMetadata $joinColumn) { |
|
247 | 247 | return $joinColumn->getReferencedColumnName(); |
248 | 248 | }, |
249 | 249 | $joinTable->getJoinColumns() |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $joinColumns = $association->getJoinColumns(); |
261 | 261 | |
262 | 262 | foreach ($joinColumns as $joinColumn) { |
263 | - if (! in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) { |
|
263 | + if ( ! in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) { |
|
264 | 264 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
265 | 265 | |
266 | 266 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | continue; |
292 | 292 | } |
293 | 293 | |
294 | - if (! ($targetProperty instanceof AssociationMetadata)) { |
|
294 | + if ( ! ($targetProperty instanceof AssociationMetadata)) { |
|
295 | 295 | $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'."; |
296 | 296 | |
297 | 297 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName()); |
@@ -62,28 +62,28 @@ discard block |
||
62 | 62 | $fh = fopen($this->file, 'xb+'); |
63 | 63 | |
64 | 64 | if (count($identityMap) === 0) { |
65 | - fwrite($fh, 'Flush Operation [' . $this->context . "] - Empty identity map.\n"); |
|
65 | + fwrite($fh, 'Flush Operation ['.$this->context."] - Empty identity map.\n"); |
|
66 | 66 | |
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
70 | - fwrite($fh, 'Flush Operation [' . $this->context . "] - Dumping identity map:\n"); |
|
70 | + fwrite($fh, 'Flush Operation ['.$this->context."] - Dumping identity map:\n"); |
|
71 | 71 | |
72 | 72 | foreach ($identityMap as $className => $map) { |
73 | - fwrite($fh, 'Class: ' . $className . "\n"); |
|
73 | + fwrite($fh, 'Class: '.$className."\n"); |
|
74 | 74 | |
75 | 75 | foreach ($map as $entity) { |
76 | - fwrite($fh, ' Entity: ' . $this->getIdString($entity, $uow) . ' ' . spl_object_id($entity) . "\n"); |
|
76 | + fwrite($fh, ' Entity: '.$this->getIdString($entity, $uow).' '.spl_object_id($entity)."\n"); |
|
77 | 77 | fwrite($fh, " Associations:\n"); |
78 | 78 | |
79 | 79 | $cm = $em->getClassMetadata($className); |
80 | 80 | |
81 | 81 | foreach ($cm->getPropertiesIterator() as $field => $association) { |
82 | - if (! ($association instanceof AssociationMetadata)) { |
|
82 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
86 | - fwrite($fh, ' ' . $field . ' '); |
|
86 | + fwrite($fh, ' '.$field.' '); |
|
87 | 87 | |
88 | 88 | $value = $association->getValue($entity); |
89 | 89 | |
@@ -98,21 +98,21 @@ discard block |
||
98 | 98 | fwrite($fh, '[PROXY] '); |
99 | 99 | } |
100 | 100 | |
101 | - fwrite($fh, $this->getIdString($value, $uow) . ' ' . spl_object_id($value) . "\n"); |
|
101 | + fwrite($fh, $this->getIdString($value, $uow).' '.spl_object_id($value)."\n"); |
|
102 | 102 | } else { |
103 | 103 | $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized(); |
104 | 104 | |
105 | 105 | if ($initialized) { |
106 | - fwrite($fh, '[INITIALIZED] ' . $this->getType($value) . ' ' . count($value) . " elements\n"); |
|
106 | + fwrite($fh, '[INITIALIZED] '.$this->getType($value).' '.count($value)." elements\n"); |
|
107 | 107 | |
108 | 108 | foreach ($value as $obj) { |
109 | - fwrite($fh, ' ' . $this->getIdString($obj, $uow) . ' ' . spl_object_id($obj) . "\n"); |
|
109 | + fwrite($fh, ' '.$this->getIdString($obj, $uow).' '.spl_object_id($obj)."\n"); |
|
110 | 110 | } |
111 | 111 | } else { |
112 | - fwrite($fh, '[PROXY] ' . $this->getType($value) . " unknown element size\n"); |
|
112 | + fwrite($fh, '[PROXY] '.$this->getType($value)." unknown element size\n"); |
|
113 | 113 | |
114 | 114 | foreach ($value->unwrap() as $obj) { |
115 | - fwrite($fh, ' ' . $this->getIdString($obj, $uow) . ' ' . spl_object_id($obj) . "\n"); |
|
115 | + fwrite($fh, ' '.$this->getIdString($obj, $uow).' '.spl_object_id($obj)."\n"); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $idstring = ''; |
152 | 152 | |
153 | 153 | foreach ($ids as $k => $v) { |
154 | - $idstring .= $k . '=' . $v; |
|
154 | + $idstring .= $k.'='.$v; |
|
155 | 155 | } |
156 | 156 | } else { |
157 | 157 | $idstring = 'NEWOBJECT '; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $lines[] = null; |
30 | 30 | |
31 | 31 | if ($namespace) { |
32 | - $lines[] = 'namespace ' . $namespace . ';'; |
|
32 | + $lines[] = 'namespace '.$namespace.';'; |
|
33 | 33 | $lines[] = null; |
34 | 34 | } |
35 | 35 | |
@@ -64,31 +64,31 @@ discard block |
||
64 | 64 | { |
65 | 65 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
66 | 66 | $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1); |
67 | - $objectReference = $bodyIndentation . self::VARIABLE; |
|
67 | + $objectReference = $bodyIndentation.self::VARIABLE; |
|
68 | 68 | $lines = []; |
69 | 69 | |
70 | - $lines[] = $indentation . 'public function __construct('; |
|
71 | - $lines[] = $bodyIndentation . 'ClassMetadataBuildingContext $metadataBuildingContext,'; |
|
72 | - $lines[] = $bodyIndentation . '?ClassMetadata $parent = null'; |
|
73 | - $lines[] = $indentation . ')'; |
|
74 | - $lines[] = $indentation . '{'; |
|
75 | - $lines[] = $bodyIndentation . 'parent::__construct("' . $metadata->getClassName() . '", $parent, $metadataBuildingContext);'; |
|
70 | + $lines[] = $indentation.'public function __construct('; |
|
71 | + $lines[] = $bodyIndentation.'ClassMetadataBuildingContext $metadataBuildingContext,'; |
|
72 | + $lines[] = $bodyIndentation.'?ClassMetadata $parent = null'; |
|
73 | + $lines[] = $indentation.')'; |
|
74 | + $lines[] = $indentation.'{'; |
|
75 | + $lines[] = $bodyIndentation.'parent::__construct("'.$metadata->getClassName().'", $parent, $metadataBuildingContext);'; |
|
76 | 76 | |
77 | 77 | if ($metadata->getCustomRepositoryClassName()) { |
78 | 78 | $lines[] = null; |
79 | - $lines[] = $objectReference . '->setCustomRepositoryClassName("' . $metadata->getCustomRepositoryClassName() . '");'; |
|
79 | + $lines[] = $objectReference.'->setCustomRepositoryClassName("'.$metadata->getCustomRepositoryClassName().'");'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | if ($metadata->changeTrackingPolicy) { |
83 | 83 | $lines[] = null; |
84 | - $lines[] = $objectReference . '->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::' . strtoupper($metadata->changeTrackingPolicy) . ');'; |
|
84 | + $lines[] = $objectReference.'->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::'.strtoupper($metadata->changeTrackingPolicy).');'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $lines[] = $this->exportInheritance($metadata, $indentationLevel); |
88 | 88 | $lines[] = $this->exportTable($metadata, $indentationLevel); |
89 | 89 | $lines[] = $this->exportProperties($metadata, $indentationLevel); |
90 | 90 | $lines[] = $this->exportLifecycleCallbacks($metadata, $indentationLevel); |
91 | - $lines[] = $indentation . '}'; |
|
91 | + $lines[] = $indentation.'}'; |
|
92 | 92 | |
93 | 93 | return implode(PHP_EOL, $lines); |
94 | 94 | } |
@@ -96,17 +96,17 @@ discard block |
||
96 | 96 | private function exportInheritance(Mapping\ClassMetadata $metadata, int $indentationLevel) : string |
97 | 97 | { |
98 | 98 | $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1); |
99 | - $objectReference = $bodyIndentation . self::VARIABLE; |
|
99 | + $objectReference = $bodyIndentation.self::VARIABLE; |
|
100 | 100 | $lines = []; |
101 | 101 | |
102 | 102 | if ($metadata->inheritanceType) { |
103 | 103 | $lines[] = null; |
104 | - $lines[] = $objectReference . '->setInheritanceType(Mapping\InheritanceType::' . strtoupper($metadata->inheritanceType) . ');'; |
|
104 | + $lines[] = $objectReference.'->setInheritanceType(Mapping\InheritanceType::'.strtoupper($metadata->inheritanceType).');'; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | if ($metadata->discriminatorColumn) { |
108 | 108 | $lines[] = null; |
109 | - $lines[] = $bodyIndentation . '// Discriminator mapping'; |
|
109 | + $lines[] = $bodyIndentation.'// Discriminator mapping'; |
|
110 | 110 | $lines[] = $this->exportDiscriminatorMetadata($metadata, $indentationLevel + 1); |
111 | 111 | } |
112 | 112 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | if ($metadata->table) { |
122 | 122 | $lines[] = null; |
123 | - $lines[] = $bodyIndentation . '// Table'; |
|
123 | + $lines[] = $bodyIndentation.'// Table'; |
|
124 | 124 | $lines[] = $this->exportTableMetadata($metadata->table, $indentationLevel + 1); |
125 | 125 | } |
126 | 126 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | foreach ($metadata->getPropertiesIterator() as $name => $property) { |
136 | 136 | $lines[] = null; |
137 | - $lines[] = $bodyIndentation . '// Property: ' . $name; |
|
137 | + $lines[] = $bodyIndentation.'// Property: '.$name; |
|
138 | 138 | $lines[] = $this->exportProperty($property, $indentationLevel + 1); |
139 | 139 | } |
140 | 140 | |
@@ -144,16 +144,16 @@ discard block |
||
144 | 144 | private function exportLifecycleCallbacks(Mapping\ClassMetadata $metadata, int $indentationLevel) : string |
145 | 145 | { |
146 | 146 | $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1); |
147 | - $objectReference = $bodyIndentation . self::VARIABLE; |
|
147 | + $objectReference = $bodyIndentation.self::VARIABLE; |
|
148 | 148 | $lines = []; |
149 | 149 | |
150 | 150 | if ($metadata->lifecycleCallbacks) { |
151 | 151 | $lines[] = null; |
152 | - $lines[] = $bodyIndentation . '// Lifecycle callbacks'; |
|
152 | + $lines[] = $bodyIndentation.'// Lifecycle callbacks'; |
|
153 | 153 | |
154 | 154 | foreach ($metadata->lifecycleCallbacks as $event => $callbacks) { |
155 | 155 | foreach ($callbacks as $callback) { |
156 | - $lines[] = $objectReference . '->addLifecycleCallback("' . $callback . '", "' . $event . '");'; |
|
156 | + $lines[] = $objectReference.'->addLifecycleCallback("'.$callback.'", "'.$event.'");'; |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | } |
@@ -166,17 +166,17 @@ discard block |
||
166 | 166 | $variableExporter = new VariableExporter(); |
167 | 167 | $discriminatorExporter = new DiscriminatorColumnMetadataExporter(); |
168 | 168 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
169 | - $objectReference = $indentation . self::VARIABLE; |
|
169 | + $objectReference = $indentation.self::VARIABLE; |
|
170 | 170 | $lines = []; |
171 | 171 | |
172 | 172 | $lines[] = $discriminatorExporter->export($metadata->discriminatorColumn, $indentationLevel); |
173 | 173 | $lines[] = null; |
174 | - $lines[] = $objectReference . '->setDiscriminatorColumn(' . $discriminatorExporter::VARIABLE . ');'; |
|
174 | + $lines[] = $objectReference.'->setDiscriminatorColumn('.$discriminatorExporter::VARIABLE.');'; |
|
175 | 175 | |
176 | 176 | if ($metadata->discriminatorMap) { |
177 | 177 | $discriminatorMap = $variableExporter->export($metadata->discriminatorMap, $indentationLevel + 1); |
178 | 178 | |
179 | - $lines[] = $objectReference . '->setDiscriminatorMap(' . $discriminatorMap . ');'; |
|
179 | + $lines[] = $objectReference.'->setDiscriminatorMap('.$discriminatorMap.');'; |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | return implode(PHP_EOL, $lines); |
@@ -186,12 +186,12 @@ discard block |
||
186 | 186 | { |
187 | 187 | $tableExporter = new TableMetadataExporter(); |
188 | 188 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
189 | - $objectReference = $indentation . self::VARIABLE; |
|
189 | + $objectReference = $indentation.self::VARIABLE; |
|
190 | 190 | $lines = []; |
191 | 191 | |
192 | 192 | $lines[] = $tableExporter->export($table, $indentationLevel); |
193 | 193 | $lines[] = null; |
194 | - $lines[] = $objectReference . '->setTable(' . $tableExporter::VARIABLE . ');'; |
|
194 | + $lines[] = $objectReference.'->setTable('.$tableExporter::VARIABLE.');'; |
|
195 | 195 | |
196 | 196 | return implode(PHP_EOL, $lines); |
197 | 197 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | private function exportProperty(Mapping\Property $property, int $indentationLevel) : string |
200 | 200 | { |
201 | 201 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
202 | - $objectReference = $indentation . self::VARIABLE; |
|
202 | + $objectReference = $indentation.self::VARIABLE; |
|
203 | 203 | $lines = []; |
204 | 204 | |
205 | 205 | switch (true) { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | $lines[] = $propertyExporter->export($property, $indentationLevel); |
232 | 232 | $lines[] = null; |
233 | - $lines[] = $objectReference . '->addProperty(' . $propertyExporter::VARIABLE . ');'; |
|
233 | + $lines[] = $objectReference.'->addProperty('.$propertyExporter::VARIABLE.');'; |
|
234 | 234 | |
235 | 235 | return implode(PHP_EOL, $lines); |
236 | 236 | } |