@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** @var ToOneAssociationMetadata $value */ |
20 | 20 | $joinColumnExporter = new JoinColumnMetadataExporter(); |
21 | 21 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
22 | - $objectReference = $indentation . self::VARIABLE; |
|
22 | + $objectReference = $indentation.self::VARIABLE; |
|
23 | 23 | $lines = []; |
24 | 24 | |
25 | 25 | $lines[] = parent::export($value, $indentationLevel); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $lines[] = null; |
29 | 29 | $lines[] = $joinColumnExporter->export($joinColumn, $indentationLevel); |
30 | 30 | $lines[] = null; |
31 | - $lines[] = $objectReference . '->addJoinColumn(' . $joinColumnExporter::VARIABLE . ');'; |
|
31 | + $lines[] = $objectReference.'->addJoinColumn('.$joinColumnExporter::VARIABLE.');'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | return implode(PHP_EOL, $lines); |
@@ -20,18 +20,18 @@ |
||
20 | 20 | { |
21 | 21 | /** @var LocalColumnMetadata $value */ |
22 | 22 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
23 | - $objectReference = $indentation . self::VARIABLE; |
|
23 | + $objectReference = $indentation.self::VARIABLE; |
|
24 | 24 | $lines = []; |
25 | 25 | |
26 | 26 | $lines[] = parent::export($value, $indentationLevel); |
27 | 27 | |
28 | - $lines[] = $objectReference . '->setLength(' . $value->getLength() . ');'; |
|
29 | - $lines[] = $objectReference . '->setScale(' . $value->getScale() . ');'; |
|
30 | - $lines[] = $objectReference . '->setPrecision(' . $value->getPrecision() . ');'; |
|
28 | + $lines[] = $objectReference.'->setLength('.$value->getLength().');'; |
|
29 | + $lines[] = $objectReference.'->setScale('.$value->getScale().');'; |
|
30 | + $lines[] = $objectReference.'->setPrecision('.$value->getPrecision().');'; |
|
31 | 31 | |
32 | 32 | if ($value->hasValueGenerator()) { |
33 | 33 | $lines[] = sprintf( |
34 | - $objectReference . '->setValueGenerator(new ValueGenerator(%s, %s));', |
|
34 | + $objectReference.'->setValueGenerator(new ValueGenerator(%s, %s));', |
|
35 | 35 | var_export($value->getValueGenerator()->getType(), true), |
36 | 36 | var_export($value->getValueGenerator()->getDefinition(), true) |
37 | 37 | ); |
@@ -19,16 +19,16 @@ |
||
19 | 19 | /** @var ToManyAssociationMetadata $value */ |
20 | 20 | $variableExporter = new VariableExporter(); |
21 | 21 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
22 | - $objectReference = $indentation . self::VARIABLE; |
|
22 | + $objectReference = $indentation.self::VARIABLE; |
|
23 | 23 | $lines = []; |
24 | 24 | |
25 | 25 | $lines[] = parent::export($value, $indentationLevel); |
26 | 26 | |
27 | - if (! empty($value->getIndexedBy())) { |
|
28 | - $lines[] = $objectReference . '->setIndexedBy("' . $value->getIndexedBy() . '"");'; |
|
27 | + if ( ! empty($value->getIndexedBy())) { |
|
28 | + $lines[] = $objectReference.'->setIndexedBy("'.$value->getIndexedBy().'"");'; |
|
29 | 29 | } |
30 | 30 | |
31 | - $lines[] = $objectReference . '->setOderBy(' . $variableExporter->export($value->getOrderBy(), $indentationLevel + 1) . ');'; |
|
31 | + $lines[] = $objectReference.'->setOderBy('.$variableExporter->export($value->getOrderBy(), $indentationLevel + 1).');'; |
|
32 | 32 | |
33 | 33 | return implode(PHP_EOL, $lines); |
34 | 34 | } |
@@ -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); |
@@ -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 |