@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getParamAnnotation(): ParamTag |
69 | 69 | { |
70 | - return new ParamTag($this->getSafeVariableName(), [ $this->getPhpType() ]); |
|
70 | + return new ParamTag($this->getSafeVariableName(), [$this->getPhpType()]); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | public function getVariableName(): string |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | public function getSafeVariableName(): string |
79 | 79 | { |
80 | - return '$' . StringUtils::getValidVariableName(ltrim($this->getVariableName(), '$')); |
|
80 | + return '$'.StringUtils::getValidVariableName(ltrim($this->getVariableName(), '$')); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | public function getSetterName(): string |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function getPhpType(): string |
89 | 89 | { |
90 | - return '\\' . $this->beanNamespace . '\\' . $this->getClassName(); |
|
90 | + return '\\'.$this->beanNamespace.'\\'.$this->getClassName(); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $referencedBeanName = $this->namingStrategy->getBeanClassName($this->foreignKey->getForeignTableName()); |
161 | 161 | |
162 | 162 | $getter = new MethodGenerator($getterName); |
163 | - $getter->setDocBlock(new DocBlockGenerator('Returns the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.')); |
|
163 | + $getter->setDocBlock(new DocBlockGenerator('Returns the '.$referencedBeanName.' object bound to this object via the '.implode(' and ', $this->foreignKey->getUnquotedLocalColumns()).' column.')); |
|
164 | 164 | |
165 | 165 | /*$types = [ $referencedBeanName ]; |
166 | 166 | if ($isNullable) { |
@@ -168,23 +168,23 @@ discard block |
||
168 | 168 | } |
169 | 169 | $getter->getDocBlock()->setTag(new ReturnTag($types));*/ |
170 | 170 | |
171 | - $getter->setReturnType(($isNullable ? '?' : '') . $this->beanNamespace . '\\' . $referencedBeanName); |
|
171 | + $getter->setReturnType(($isNullable ? '?' : '').$this->beanNamespace.'\\'.$referencedBeanName); |
|
172 | 172 | $tdbmFk = ForeignKey::createFromFk($this->foreignKey); |
173 | 173 | |
174 | - $getter->setBody('return $this->getRef(' . var_export($tdbmFk->getCacheKey(), true) . ', ' . var_export($tableName, true) . ');'); |
|
174 | + $getter->setBody('return $this->getRef('.var_export($tdbmFk->getCacheKey(), true).', '.var_export($tableName, true).');'); |
|
175 | 175 | |
176 | 176 | if ($this->isGetterProtected()) { |
177 | 177 | $getter->setVisibility(AbstractMemberGenerator::VISIBILITY_PROTECTED); |
178 | 178 | } |
179 | 179 | |
180 | 180 | $setter = new MethodGenerator($setterName); |
181 | - $setter->setDocBlock(new DocBlockGenerator('The setter for the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.')); |
|
181 | + $setter->setDocBlock(new DocBlockGenerator('The setter for the '.$referencedBeanName.' object bound to this object via the '.implode(' and ', $this->foreignKey->getUnquotedLocalColumns()).' column.')); |
|
182 | 182 | |
183 | - $setter->setParameter(new ParameterGenerator('object', ($isNullable ? '?' : '') . $this->beanNamespace . '\\' . $referencedBeanName)); |
|
183 | + $setter->setParameter(new ParameterGenerator('object', ($isNullable ? '?' : '').$this->beanNamespace.'\\'.$referencedBeanName)); |
|
184 | 184 | |
185 | 185 | $setter->setReturnType('void'); |
186 | 186 | |
187 | - $setter->setBody('$this->setRef(' . var_export($tdbmFk->getCacheKey(), true) . ', $object, ' . var_export($tableName, true) . ');'); |
|
187 | + $setter->setBody('$this->setRef('.var_export($tdbmFk->getCacheKey(), true).', $object, '.var_export($tableName, true).');'); |
|
188 | 188 | |
189 | 189 | if ($this->isSetterProtected()) { |
190 | 190 | $setter->setVisibility(AbstractMemberGenerator::VISIBILITY_PROTECTED); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | /** @var Annotation\JsonFormat|null $jsonFormat */ |
221 | 221 | $jsonFormat = $this->findAnnotation(Annotation\JsonFormat::class); |
222 | 222 | if ($jsonFormat !== null) { |
223 | - $method = $jsonFormat->method ?? 'get' . ucfirst($jsonFormat->property); |
|
223 | + $method = $jsonFormat->method ?? 'get'.ucfirst($jsonFormat->property); |
|
224 | 224 | $format = "$method()"; |
225 | 225 | } else { |
226 | 226 | $stopRecursion = $this->findAnnotation(Annotation\JsonRecursive::class) ? '' : 'true'; |
@@ -277,10 +277,10 @@ discard block |
||
277 | 277 | } elseif ($descriptor instanceof ScalarBeanPropertyDescriptor) { |
278 | 278 | $rows[] = "'$indexName' => $propertyAccess->$columnGetterName()"; |
279 | 279 | } else { |
280 | - throw new TDBMException('PropertyDescriptor of class `' . get_class($descriptor) . '` cannot be serialized.'); |
|
280 | + throw new TDBMException('PropertyDescriptor of class `'.get_class($descriptor).'` cannot be serialized.'); |
|
281 | 281 | } |
282 | 282 | } |
283 | - return '[' . implode(', ', $rows) . ']'; |
|
283 | + return '['.implode(', ', $rows).']'; |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | private function getBeanPropertyDescriptor(string $column): AbstractBeanPropertyDescriptor |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | return $descriptor; |
294 | 294 | } |
295 | 295 | } |
296 | - throw new TDBMException('PropertyDescriptor for `'.$this->table->getName().'`.`' . $column . '` not found in `' . $this->foreignBeanDescriptor->getTable()->getName() . '`'); |
|
296 | + throw new TDBMException('PropertyDescriptor for `'.$this->table->getName().'`.`'.$column.'` not found in `'.$this->foreignBeanDescriptor->getTable()->getName().'`'); |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | /** |