@@ -22,20 +22,20 @@ |
||
22 | 22 | /** @var ColumnMetadata $value */ |
23 | 23 | $variableExporter = new VariableExporter(); |
24 | 24 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
25 | - $objectReference = $indentation . self::VARIABLE; |
|
25 | + $objectReference = $indentation.self::VARIABLE; |
|
26 | 26 | $lines = []; |
27 | 27 | |
28 | - $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value); |
|
28 | + $lines[] = $objectReference.' = '.$this->exportInstantiation($value); |
|
29 | 29 | |
30 | - if (! empty($value->getColumnDefinition())) { |
|
31 | - $lines[] = $objectReference . '->setColumnDefinition("' . $value->getColumnDefinition() . '");'; |
|
30 | + if ( ! empty($value->getColumnDefinition())) { |
|
31 | + $lines[] = $objectReference.'->setColumnDefinition("'.$value->getColumnDefinition().'");'; |
|
32 | 32 | } |
33 | 33 | |
34 | - $lines[] = $objectReference . '->setTableName("' . $value->getTableName() . '");'; |
|
35 | - $lines[] = $objectReference . '->setOptions(' . ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)) . ');'; |
|
36 | - $lines[] = $objectReference . '->setPrimaryKey(' . ltrim($variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1)) . ');'; |
|
37 | - $lines[] = $objectReference . '->setNullable(' . ltrim($variableExporter->export($value->isNullable(), $indentationLevel + 1)) . ');'; |
|
38 | - $lines[] = $objectReference . '->setUnique(' . ltrim($variableExporter->export($value->isUnique(), $indentationLevel + 1)) . ');'; |
|
34 | + $lines[] = $objectReference.'->setTableName("'.$value->getTableName().'");'; |
|
35 | + $lines[] = $objectReference.'->setOptions('.ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)).');'; |
|
36 | + $lines[] = $objectReference.'->setPrimaryKey('.ltrim($variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1)).');'; |
|
37 | + $lines[] = $objectReference.'->setNullable('.ltrim($variableExporter->export($value->isNullable(), $indentationLevel + 1)).');'; |
|
38 | + $lines[] = $objectReference.'->setUnique('.ltrim($variableExporter->export($value->isUnique(), $indentationLevel + 1)).');'; |
|
39 | 39 | |
40 | 40 | return implode(PHP_EOL, $lines); |
41 | 41 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | /** @var ManyToManyAssociationMetadata $value */ |
23 | 23 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
24 | - $objectReference = $indentation . self::VARIABLE; |
|
24 | + $objectReference = $indentation.self::VARIABLE; |
|
25 | 25 | $lines = []; |
26 | 26 | |
27 | 27 | $lines[] = parent::export($value, $indentationLevel); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $lines[] = null; |
33 | 33 | $lines[] = $joinTableExporter->export($value->getJoinTable(), $indentationLevel); |
34 | 34 | $lines[] = null; |
35 | - $lines[] = $objectReference . '->setJoinTable(' . $joinTableExporter::VARIABLE . ');'; |
|
35 | + $lines[] = $objectReference.'->setJoinTable('.$joinTableExporter::VARIABLE.');'; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return implode(PHP_EOL, $lines); |
@@ -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);'; |
|
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);'; |
|
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->getDeclaredPropertiesIterator() 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) { |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | $lines[] = $propertyExporter->export($property, $indentationLevel); |
236 | 236 | $lines[] = null; |
237 | - $lines[] = $objectReference . '->addProperty(' . $propertyExporter::VARIABLE . ');'; |
|
237 | + $lines[] = $objectReference.'->addProperty('.$propertyExporter::VARIABLE.');'; |
|
238 | 238 | |
239 | 239 | return implode(PHP_EOL, $lines); |
240 | 240 | } |
@@ -19,9 +19,9 @@ |
||
19 | 19 | { |
20 | 20 | /** @var TransientMetadata $value */ |
21 | 21 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
22 | - $objectReference = $indentation . self::VARIABLE; |
|
22 | + $objectReference = $indentation.self::VARIABLE; |
|
23 | 23 | |
24 | - return $objectReference . ' = ' . $this->exportInstantiation($value); |
|
24 | + return $objectReference.' = '.$this->exportInstantiation($value); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | protected function exportInstantiation(TransientMetadata $metadata) : string |
@@ -22,10 +22,10 @@ |
||
22 | 22 | { |
23 | 23 | /** @var CacheMetadata $value */ |
24 | 24 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
25 | - $objectReference = $indentation . self::VARIABLE; |
|
25 | + $objectReference = $indentation.self::VARIABLE; |
|
26 | 26 | $lines = []; |
27 | 27 | |
28 | - $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value); |
|
28 | + $lines[] = $objectReference.' = '.$this->exportInstantiation($value); |
|
29 | 29 | |
30 | 30 | return implode(PHP_EOL, $lines); |
31 | 31 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $classMetadata = $this->em->getClassMetadata($class); |
123 | 123 | $platform = $this->em->getConnection()->getDatabasePlatform(); |
124 | 124 | |
125 | - if (! $this->isInheritanceSupported($classMetadata)) { |
|
125 | + if ( ! $this->isInheritanceSupported($classMetadata)) { |
|
126 | 126 | throw new InvalidArgumentException( |
127 | 127 | 'ResultSetMapping builder does not currently support your inheritance scheme.' |
128 | 128 | ); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | ); |
163 | 163 | } |
164 | 164 | |
165 | - if (! $joinColumn->getType()) { |
|
165 | + if ( ! $joinColumn->getType()) { |
|
166 | 166 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
167 | 167 | } |
168 | 168 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | { |
202 | 202 | switch ($mode) { |
203 | 203 | case self::COLUMN_RENAMING_INCREMENT: |
204 | - return $columnName . $this->sqlCounter++; |
|
204 | + return $columnName.$this->sqlCounter++; |
|
205 | 205 | case self::COLUMN_RENAMING_CUSTOM: |
206 | 206 | return $customRenameColumns[$columnName] ?? $columnName; |
207 | 207 | case self::COLUMN_RENAMING_NONE: |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $sql .= ', '; |
231 | 231 | } |
232 | 232 | |
233 | - $sql .= $tableAlias . '.'; |
|
233 | + $sql .= $tableAlias.'.'; |
|
234 | 234 | |
235 | 235 | if (isset($this->fieldMappings[$columnName])) { |
236 | 236 | $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $sql .= $this->discriminatorColumns[$dqlAlias]; |
243 | 243 | } |
244 | 244 | |
245 | - $sql .= ' AS ' . $columnName; |
|
245 | + $sql .= ' AS '.$columnName; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | return $sql; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | case CompositeExpression::TYPE_OR: |
95 | 95 | return new Expr\Orx($expressionList); |
96 | 96 | default: |
97 | - throw new RuntimeException('Unknown composite ' . $expr->getType()); |
|
97 | + throw new RuntimeException('Unknown composite '.$expr->getType()); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function walkComparison(Comparison $comparison) |
105 | 105 | { |
106 | - if (! isset($this->queryAliases[0])) { |
|
106 | + if ( ! isset($this->queryAliases[0])) { |
|
107 | 107 | throw new QueryException('No aliases are set before invoking walkComparison().'); |
108 | 108 | } |
109 | 109 | |
110 | - $field = $this->queryAliases[0] . '.' . $comparison->getField(); |
|
110 | + $field = $this->queryAliases[0].'.'.$comparison->getField(); |
|
111 | 111 | |
112 | 112 | foreach ($this->queryAliases as $alias) { |
113 | - if (strpos($comparison->getField() . '.', $alias . '.') === 0) { |
|
113 | + if (strpos($comparison->getField().'.', $alias.'.') === 0) { |
|
114 | 114 | $field = $comparison->getField(); |
115 | 115 | break; |
116 | 116 | } |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | |
122 | 122 | foreach ($this->parameters as $parameter) { |
123 | 123 | if ($parameter->getName() === $parameterName) { |
124 | - $parameterName .= '_' . $parameterCount; |
|
124 | + $parameterName .= '_'.$parameterCount; |
|
125 | 125 | break; |
126 | 126 | } |
127 | 127 | } |
128 | 128 | |
129 | 129 | $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); |
130 | - $placeholder = ':' . $parameterName; |
|
130 | + $placeholder = ':'.$parameterName; |
|
131 | 131 | |
132 | 132 | switch ($comparison->getOperator()) { |
133 | 133 | case Comparison::IN: |
@@ -154,17 +154,17 @@ discard block |
||
154 | 154 | |
155 | 155 | return $this->expr->neq($field, $placeholder); |
156 | 156 | case Comparison::CONTAINS: |
157 | - $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType()); |
|
157 | + $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType()); |
|
158 | 158 | $this->parameters[] = $parameter; |
159 | 159 | |
160 | 160 | return $this->expr->like($field, $placeholder); |
161 | 161 | case Comparison::STARTS_WITH: |
162 | - $parameter->setValue($parameter->getValue() . '%', $parameter->getType()); |
|
162 | + $parameter->setValue($parameter->getValue().'%', $parameter->getType()); |
|
163 | 163 | $this->parameters[] = $parameter; |
164 | 164 | |
165 | 165 | return $this->expr->like($field, $placeholder); |
166 | 166 | case Comparison::ENDS_WITH: |
167 | - $parameter->setValue('%' . $parameter->getValue(), $parameter->getType()); |
|
167 | + $parameter->setValue('%'.$parameter->getValue(), $parameter->getType()); |
|
168 | 168 | $this->parameters[] = $parameter; |
169 | 169 | |
170 | 170 | return $this->expr->like($field, $placeholder); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | ); |
181 | 181 | } |
182 | 182 | |
183 | - throw new RuntimeException('Unknown comparison operator: ' . $comparison->getOperator()); |
|
183 | + throw new RuntimeException('Unknown comparison operator: '.$comparison->getOperator()); |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function getClassShortName(string $className) : string |
31 | 31 | { |
32 | 32 | if (strpos($className, '\\') !== false) { |
33 | - $className = substr($className, strrpos($className, '\\')+1); |
|
33 | + $className = substr($className, strrpos($className, '\\') + 1); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | return $className; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $namespace = ''; |
45 | 45 | |
46 | 46 | if (strpos($className, '\\') !== false) { |
47 | - $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\')+1)); |
|
47 | + $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1)); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return $namespace; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | $this->computeChangeSets(); |
342 | 342 | |
343 | - if (! ($this->entityInsertions || |
|
343 | + if ( ! ($this->entityInsertions || |
|
344 | 344 | $this->entityDeletions || |
345 | 345 | $this->entityUpdates || |
346 | 346 | $this->collectionUpdates || |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | // Entity deletions come last and need to be in reverse commit order |
402 | 402 | if ($this->entityDeletions) { |
403 | 403 | foreach (array_reverse($commitOrder) as $committedEntityName) { |
404 | - if (! $this->entityDeletions) { |
|
404 | + if ( ! $this->entityDeletions) { |
|
405 | 405 | break; // just a performance optimisation |
406 | 406 | } |
407 | 407 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | $oid = spl_object_id($entity); |
486 | 486 | $data = []; |
487 | 487 | |
488 | - if (! isset($this->entityChangeSets[$oid])) { |
|
488 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
489 | 489 | return $data; |
490 | 490 | } |
491 | 491 | |
@@ -565,12 +565,12 @@ discard block |
||
565 | 565 | || ! $class->getProperty($name) instanceof FieldMetadata |
566 | 566 | || ! $class->getProperty($name)->hasValueGenerator() |
567 | 567 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
568 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
568 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
569 | 569 | $actualData[$name] = $value; |
570 | 570 | } |
571 | 571 | } |
572 | 572 | |
573 | - if (! isset($this->originalEntityData[$oid])) { |
|
573 | + if ( ! isset($this->originalEntityData[$oid])) { |
|
574 | 574 | // Entity is either NEW or MANAGED but not yet fully persisted (only has an id). |
575 | 575 | // These result in an INSERT. |
576 | 576 | $this->originalEntityData[$oid] = $actualData; |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | |
598 | 598 | foreach ($actualData as $propName => $actualValue) { |
599 | 599 | // skip field, its a partially omitted one! |
600 | - if (! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { |
|
600 | + if ( ! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { |
|
601 | 601 | continue; |
602 | 602 | } |
603 | 603 | |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | if ($owner === null) { // cloned |
620 | 620 | $actualValue->setOwner($entity, $property); |
621 | 621 | } elseif ($owner !== $entity) { // no clone, we have to fix |
622 | - if (! $actualValue->isInitialized()) { |
|
622 | + if ( ! $actualValue->isInitialized()) { |
|
623 | 623 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
624 | 624 | } |
625 | 625 | |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | // Check if original value exists |
658 | 658 | if ($orgValue instanceof PersistentCollection) { |
659 | 659 | // A PersistentCollection was de-referenced, so delete it. |
660 | - if (! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
660 | + if ( ! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
661 | 661 | $this->scheduleCollectionDeletion($orgValue); |
662 | 662 | |
663 | 663 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | |
681 | 681 | // Look for changes in associations of the entity |
682 | 682 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
683 | - if (! $property instanceof AssociationMetadata) { |
|
683 | + if ( ! $property instanceof AssociationMetadata) { |
|
684 | 684 | continue; |
685 | 685 | } |
686 | 686 | |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here. |
748 | 748 | $oid = spl_object_id($entity); |
749 | 749 | |
750 | - if (! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { |
|
750 | + if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { |
|
751 | 751 | $this->computeChangeSet($class, $entity); |
752 | 752 | } |
753 | 753 | } |
@@ -784,13 +784,13 @@ discard block |
||
784 | 784 | $targetClass = $this->em->getClassMetadata($targetEntity); |
785 | 785 | |
786 | 786 | foreach ($unwrappedValue as $key => $entry) { |
787 | - if (! ($entry instanceof $targetEntity)) { |
|
787 | + if ( ! ($entry instanceof $targetEntity)) { |
|
788 | 788 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
789 | 789 | } |
790 | 790 | |
791 | 791 | $state = $this->getEntityState($entry, self::STATE_NEW); |
792 | 792 | |
793 | - if (! ($entry instanceof $targetEntity)) { |
|
793 | + if ( ! ($entry instanceof $targetEntity)) { |
|
794 | 794 | throw UnexpectedAssociationValue::create( |
795 | 795 | $association->getSourceEntity(), |
796 | 796 | $association->getName(), |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | |
802 | 802 | switch ($state) { |
803 | 803 | case self::STATE_NEW: |
804 | - if (! in_array('persist', $association->getCascade(), true)) { |
|
804 | + if ( ! in_array('persist', $association->getCascade(), true)) { |
|
805 | 805 | $this->nonCascadedNewDetectedEntities[spl_object_id($entry)] = [$association, $entry]; |
806 | 806 | |
807 | 807 | break; |
@@ -850,12 +850,12 @@ discard block |
||
850 | 850 | $persister = $this->getEntityPersister($class->getClassName()); |
851 | 851 | $generationPlan->executeImmediate($this->em, $entity); |
852 | 852 | |
853 | - if (! $generationPlan->containsDeferred()) { |
|
853 | + if ( ! $generationPlan->containsDeferred()) { |
|
854 | 854 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
855 | 855 | |
856 | 856 | // Some identifiers may be foreign keys to new entities. |
857 | 857 | // In this case, we don't have the value yet and should treat it as if we have a post-insert generator |
858 | - if (! $this->hasMissingIdsWhichAreForeignKeys($class, $id)) { |
|
858 | + if ( ! $this->hasMissingIdsWhichAreForeignKeys($class, $id)) { |
|
859 | 859 | $this->entityIdentifiers[$oid] = $id; |
860 | 860 | } |
861 | 861 | } |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | { |
901 | 901 | $oid = spl_object_id($entity); |
902 | 902 | |
903 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
903 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
904 | 904 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
905 | 905 | } |
906 | 906 | |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | break; |
923 | 923 | |
924 | 924 | case $property instanceof FieldMetadata: |
925 | - if (! $property->isPrimaryKey() |
|
925 | + if ( ! $property->isPrimaryKey() |
|
926 | 926 | || ! $property->getValueGenerator() |
927 | 927 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
928 | 928 | $actualData[$name] = $property->getValue($entity); |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | } |
937 | 937 | } |
938 | 938 | |
939 | - if (! isset($this->originalEntityData[$oid])) { |
|
939 | + if ( ! isset($this->originalEntityData[$oid])) { |
|
940 | 940 | throw new RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.'); |
941 | 941 | } |
942 | 942 | |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | if ($changeSet) { |
955 | 955 | if (isset($this->entityChangeSets[$oid])) { |
956 | 956 | $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet); |
957 | - } elseif (! isset($this->entityInsertions[$oid])) { |
|
957 | + } elseif ( ! isset($this->entityInsertions[$oid])) { |
|
958 | 958 | $this->entityChangeSets[$oid] = $changeSet; |
959 | 959 | $this->entityUpdates[$oid] = $entity; |
960 | 960 | } |
@@ -1050,7 +1050,7 @@ discard block |
||
1050 | 1050 | $this->recomputeSingleEntityChangeSet($class, $entity); |
1051 | 1051 | } |
1052 | 1052 | |
1053 | - if (! empty($this->entityChangeSets[$oid])) { |
|
1053 | + if ( ! empty($this->entityChangeSets[$oid])) { |
|
1054 | 1054 | $persister->update($entity); |
1055 | 1055 | } |
1056 | 1056 | |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | |
1090 | 1090 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
1091 | 1091 | // is obtained by a new entity because the old one went out of scope. |
1092 | - if (! $class->isIdentifierComposite()) { |
|
1092 | + if ( ! $class->isIdentifierComposite()) { |
|
1093 | 1093 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
1094 | 1094 | |
1095 | 1095 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1136,13 +1136,13 @@ discard block |
||
1136 | 1136 | // Calculate dependencies for new nodes |
1137 | 1137 | while ($class = array_pop($newNodes)) { |
1138 | 1138 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
1139 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1139 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1140 | 1140 | continue; |
1141 | 1141 | } |
1142 | 1142 | |
1143 | 1143 | $targetClass = $this->em->getClassMetadata($property->getTargetEntity()); |
1144 | 1144 | |
1145 | - if (! $calc->hasNode($targetClass->getClassName())) { |
|
1145 | + if ( ! $calc->hasNode($targetClass->getClassName())) { |
|
1146 | 1146 | $calc->addNode($targetClass->getClassName(), $targetClass); |
1147 | 1147 | |
1148 | 1148 | $newNodes[] = $targetClass; |
@@ -1150,7 +1150,7 @@ discard block |
||
1150 | 1150 | |
1151 | 1151 | $weight = ! array_filter( |
1152 | 1152 | $property->getJoinColumns(), |
1153 | - static function (JoinColumnMetadata $joinColumn) { |
|
1153 | + static function(JoinColumnMetadata $joinColumn) { |
|
1154 | 1154 | return $joinColumn->isNullable(); |
1155 | 1155 | } |
1156 | 1156 | ); |
@@ -1158,14 +1158,14 @@ discard block |
||
1158 | 1158 | $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight); |
1159 | 1159 | |
1160 | 1160 | // If the target class has mapped subclasses, these share the same dependency. |
1161 | - if (! $targetClass->getSubClasses()) { |
|
1161 | + if ( ! $targetClass->getSubClasses()) { |
|
1162 | 1162 | continue; |
1163 | 1163 | } |
1164 | 1164 | |
1165 | 1165 | foreach ($targetClass->getSubClasses() as $subClassName) { |
1166 | 1166 | $targetSubClass = $this->em->getClassMetadata($subClassName); |
1167 | 1167 | |
1168 | - if (! $calc->hasNode($subClassName)) { |
|
1168 | + if ( ! $calc->hasNode($subClassName)) { |
|
1169 | 1169 | $calc->addNode($targetSubClass->getClassName(), $targetSubClass); |
1170 | 1170 | |
1171 | 1171 | $newNodes[] = $targetSubClass; |
@@ -1241,7 +1241,7 @@ discard block |
||
1241 | 1241 | { |
1242 | 1242 | $oid = spl_object_id($entity); |
1243 | 1243 | |
1244 | - if (! isset($this->entityIdentifiers[$oid])) { |
|
1244 | + if ( ! isset($this->entityIdentifiers[$oid])) { |
|
1245 | 1245 | throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update'); |
1246 | 1246 | } |
1247 | 1247 | |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | throw ORMInvalidArgumentException::entityIsRemoved($entity, 'schedule for update'); |
1250 | 1250 | } |
1251 | 1251 | |
1252 | - if (! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { |
|
1252 | + if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { |
|
1253 | 1253 | $this->entityUpdates[$oid] = $entity; |
1254 | 1254 | } |
1255 | 1255 | } |
@@ -1324,7 +1324,7 @@ discard block |
||
1324 | 1324 | return; // entity has not been persisted yet, so nothing more to do. |
1325 | 1325 | } |
1326 | 1326 | |
1327 | - if (! $this->isInIdentityMap($entity)) { |
|
1327 | + if ( ! $this->isInIdentityMap($entity)) { |
|
1328 | 1328 | return; |
1329 | 1329 | } |
1330 | 1330 | |
@@ -1332,7 +1332,7 @@ discard block |
||
1332 | 1332 | |
1333 | 1333 | unset($this->entityUpdates[$oid]); |
1334 | 1334 | |
1335 | - if (! isset($this->entityDeletions[$oid])) { |
|
1335 | + if ( ! isset($this->entityDeletions[$oid])) { |
|
1336 | 1336 | $this->entityDeletions[$oid] = $entity; |
1337 | 1337 | $this->entityStates[$oid] = self::STATE_REMOVED; |
1338 | 1338 | } |
@@ -1434,7 +1434,7 @@ discard block |
||
1434 | 1434 | $persister = $this->getEntityPersister($class->getClassName()); |
1435 | 1435 | $id = $persister->getIdentifier($entity); |
1436 | 1436 | |
1437 | - if (! $id) { |
|
1437 | + if ( ! $id) { |
|
1438 | 1438 | return self::STATE_NEW; |
1439 | 1439 | } |
1440 | 1440 | |
@@ -1792,7 +1792,7 @@ discard block |
||
1792 | 1792 | $class = $this->em->getClassMetadata(get_class($entity)); |
1793 | 1793 | |
1794 | 1794 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
1795 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) { |
|
1795 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) { |
|
1796 | 1796 | continue; |
1797 | 1797 | } |
1798 | 1798 | |
@@ -1839,7 +1839,7 @@ discard block |
||
1839 | 1839 | } |
1840 | 1840 | |
1841 | 1841 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
1842 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) { |
|
1842 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) { |
|
1843 | 1843 | continue; |
1844 | 1844 | } |
1845 | 1845 | |
@@ -1855,7 +1855,7 @@ discard block |
||
1855 | 1855 | |
1856 | 1856 | case $relatedEntities instanceof Collection: |
1857 | 1857 | case is_array($relatedEntities): |
1858 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
1858 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
1859 | 1859 | throw ORMInvalidArgumentException::invalidAssociation( |
1860 | 1860 | $this->em->getClassMetadata($targetEntity), |
1861 | 1861 | $association, |
@@ -1870,7 +1870,7 @@ discard block |
||
1870 | 1870 | break; |
1871 | 1871 | |
1872 | 1872 | case $relatedEntities !== null: |
1873 | - if (! $relatedEntities instanceof $targetEntity) { |
|
1873 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
1874 | 1874 | throw ORMInvalidArgumentException::invalidAssociation( |
1875 | 1875 | $this->em->getClassMetadata($targetEntity), |
1876 | 1876 | $association, |
@@ -1899,7 +1899,7 @@ discard block |
||
1899 | 1899 | $class = $this->em->getClassMetadata(get_class($entity)); |
1900 | 1900 | |
1901 | 1901 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
1902 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) { |
|
1902 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) { |
|
1903 | 1903 | continue; |
1904 | 1904 | } |
1905 | 1905 | |
@@ -1958,7 +1958,7 @@ discard block |
||
1958 | 1958 | |
1959 | 1959 | switch (true) { |
1960 | 1960 | case $lockMode === LockMode::OPTIMISTIC: |
1961 | - if (! $class->isVersioned()) { |
|
1961 | + if ( ! $class->isVersioned()) { |
|
1962 | 1962 | throw OptimisticLockException::notVersioned($class->getClassName()); |
1963 | 1963 | } |
1964 | 1964 | |
@@ -1981,7 +1981,7 @@ discard block |
||
1981 | 1981 | case $lockMode === LockMode::NONE: |
1982 | 1982 | case $lockMode === LockMode::PESSIMISTIC_READ: |
1983 | 1983 | case $lockMode === LockMode::PESSIMISTIC_WRITE: |
1984 | - if (! $this->em->getConnection()->isTransactionActive()) { |
|
1984 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
1985 | 1985 | throw TransactionRequiredException::transactionRequired(); |
1986 | 1986 | } |
1987 | 1987 | |
@@ -2139,7 +2139,7 @@ discard block |
||
2139 | 2139 | $entity->addPropertyChangedListener($this); |
2140 | 2140 | } |
2141 | 2141 | } else { |
2142 | - if (! isset($hints[Query::HINT_REFRESH]) |
|
2142 | + if ( ! isset($hints[Query::HINT_REFRESH]) |
|
2143 | 2143 | || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) { |
2144 | 2144 | return $entity; |
2145 | 2145 | } |
@@ -2187,7 +2187,7 @@ discard block |
||
2187 | 2187 | } |
2188 | 2188 | |
2189 | 2189 | foreach ($class->getDeclaredPropertiesIterator() as $field => $association) { |
2190 | - if (! ($association instanceof AssociationMetadata)) { |
|
2190 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
2191 | 2191 | continue; |
2192 | 2192 | } |
2193 | 2193 | |
@@ -2236,7 +2236,7 @@ discard block |
||
2236 | 2236 | continue; |
2237 | 2237 | } |
2238 | 2238 | |
2239 | - if (! $association->isOwningSide()) { |
|
2239 | + if ( ! $association->isOwningSide()) { |
|
2240 | 2240 | // use the given entity association |
2241 | 2241 | if (isset($data[$field]) && is_object($data[$field]) && |
2242 | 2242 | isset($this->entityStates[spl_object_id($data[$field])])) { |
@@ -2286,7 +2286,7 @@ discard block |
||
2286 | 2286 | $associatedId[$targetField] = $joinColumnValue; |
2287 | 2287 | } |
2288 | 2288 | |
2289 | - if (! $associatedId) { |
|
2289 | + if ( ! $associatedId) { |
|
2290 | 2290 | // Foreign key is NULL |
2291 | 2291 | $association->setValue($entity, null); |
2292 | 2292 | $this->originalEntityData[$oid][$field] = null; |
@@ -2295,7 +2295,7 @@ discard block |
||
2295 | 2295 | } |
2296 | 2296 | |
2297 | 2297 | // @todo guilhermeblanco Can we remove the need of this somehow? |
2298 | - if (! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2298 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2299 | 2299 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
2300 | 2300 | } |
2301 | 2301 | |
@@ -2312,7 +2312,7 @@ discard block |
||
2312 | 2312 | // If this is an uninitialized proxy, we are deferring eager loads, |
2313 | 2313 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
2314 | 2314 | // then we can append this entity for eager loading! |
2315 | - if (! $targetClass->isIdentifierComposite() && |
|
2315 | + if ( ! $targetClass->isIdentifierComposite() && |
|
2316 | 2316 | $newValue instanceof GhostObjectInterface && |
2317 | 2317 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2318 | 2318 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2395,7 +2395,7 @@ discard block |
||
2395 | 2395 | |
2396 | 2396 | public function triggerEagerLoads() |
2397 | 2397 | { |
2398 | - if (! $this->eagerLoadingEntities) { |
|
2398 | + if ( ! $this->eagerLoadingEntities) { |
|
2399 | 2399 | return; |
2400 | 2400 | } |
2401 | 2401 | |
@@ -2404,7 +2404,7 @@ discard block |
||
2404 | 2404 | $this->eagerLoadingEntities = []; |
2405 | 2405 | |
2406 | 2406 | foreach ($eagerLoadingEntities as $entityName => $ids) { |
2407 | - if (! $ids) { |
|
2407 | + if ( ! $ids) { |
|
2408 | 2408 | continue; |
2409 | 2409 | } |
2410 | 2410 | |
@@ -2702,7 +2702,7 @@ discard block |
||
2702 | 2702 | { |
2703 | 2703 | $class = $this->em->getClassMetadata(get_class($entity)); |
2704 | 2704 | |
2705 | - if (! $class->getProperty($propertyName)) { |
|
2705 | + if ( ! $class->getProperty($propertyName)) { |
|
2706 | 2706 | return; // ignore non-persistent fields |
2707 | 2707 | } |
2708 | 2708 | |
@@ -2711,7 +2711,7 @@ discard block |
||
2711 | 2711 | // Update changeset and mark entity for synchronization |
2712 | 2712 | $this->entityChangeSets[$oid][$propertyName] = [$oldValue, $newValue]; |
2713 | 2713 | |
2714 | - if (! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) { |
|
2714 | + if ( ! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) { |
|
2715 | 2715 | $this->scheduleForSynchronization($entity); |
2716 | 2716 | } |
2717 | 2717 | } |
@@ -2793,7 +2793,7 @@ discard block |
||
2793 | 2793 | */ |
2794 | 2794 | private static function objToStr($obj) |
2795 | 2795 | { |
2796 | - return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj); |
|
2796 | + return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj); |
|
2797 | 2797 | } |
2798 | 2798 | |
2799 | 2799 | /** |
@@ -2808,7 +2808,7 @@ discard block |
||
2808 | 2808 | */ |
2809 | 2809 | public function markReadOnly($object) |
2810 | 2810 | { |
2811 | - if (! is_object($object) || ! $this->isInIdentityMap($object)) { |
|
2811 | + if ( ! is_object($object) || ! $this->isInIdentityMap($object)) { |
|
2812 | 2812 | throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); |
2813 | 2813 | } |
2814 | 2814 | |
@@ -2826,7 +2826,7 @@ discard block |
||
2826 | 2826 | */ |
2827 | 2827 | public function isReadOnly($object) |
2828 | 2828 | { |
2829 | - if (! is_object($object)) { |
|
2829 | + if ( ! is_object($object)) { |
|
2830 | 2830 | throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); |
2831 | 2831 | } |
2832 | 2832 | |
@@ -2838,7 +2838,7 @@ discard block |
||
2838 | 2838 | */ |
2839 | 2839 | private function afterTransactionComplete() |
2840 | 2840 | { |
2841 | - $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) { |
|
2841 | + $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) { |
|
2842 | 2842 | $persister->afterTransactionComplete(); |
2843 | 2843 | }); |
2844 | 2844 | } |
@@ -2848,7 +2848,7 @@ discard block |
||
2848 | 2848 | */ |
2849 | 2849 | private function afterTransactionRolledBack() |
2850 | 2850 | { |
2851 | - $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) { |
|
2851 | + $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) { |
|
2852 | 2852 | $persister->afterTransactionRolledBack(); |
2853 | 2853 | }); |
2854 | 2854 | } |
@@ -2858,7 +2858,7 @@ discard block |
||
2858 | 2858 | */ |
2859 | 2859 | private function performCallbackOnCachedPersister(callable $callback) |
2860 | 2860 | { |
2861 | - if (! $this->hasCache) { |
|
2861 | + if ( ! $this->hasCache) { |
|
2862 | 2862 | return; |
2863 | 2863 | } |
2864 | 2864 |