Passed
Push — master ( fed116...a49d62 )
by
unknown
03:54
created
src/Utils/AbstractBeanPropertyDescriptor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Utils/ObjectBeanPropertyDescriptor.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,10 +168,10 @@  discard block
 block discarded – undo
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);
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
 
180 180
         if (!$this->isReadOnly()) {
181 181
             $setter = new MethodGenerator($setterName);
182
-            $setter->setDocBlock(new DocBlockGenerator('The setter for the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.'));
182
+            $setter->setDocBlock(new DocBlockGenerator('The setter for the '.$referencedBeanName.' object bound to this object via the '.implode(' and ', $this->foreignKey->getUnquotedLocalColumns()).' column.'));
183 183
 
184
-            $setter->setParameter(new ParameterGenerator('object', ($isNullable ? '?' : '') . $this->beanNamespace . '\\' . $referencedBeanName));
184
+            $setter->setParameter(new ParameterGenerator('object', ($isNullable ? '?' : '').$this->beanNamespace.'\\'.$referencedBeanName));
185 185
 
186 186
             $setter->setReturnType('void');
187 187
 
188
-            $setter->setBody('$this->setRef(' . var_export($tdbmFk->getCacheKey(), true) . ', $object, ' . var_export($tableName, true) . ');');
188
+            $setter->setBody('$this->setRef('.var_export($tdbmFk->getCacheKey(), true).', $object, '.var_export($tableName, true).');');
189 189
 
190 190
             if ($this->isSetterProtected()) {
191 191
                 $setter->setVisibility(AbstractMemberGenerator::VISIBILITY_PROTECTED);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             /** @var Annotation\JsonFormat|null $jsonFormat */
225 225
             $jsonFormat = $this->findAnnotation(Annotation\JsonFormat::class);
226 226
             if ($jsonFormat !== null) {
227
-                $method = $jsonFormat->method ?? 'get' . ucfirst($jsonFormat->property);
227
+                $method = $jsonFormat->method ?? 'get'.ucfirst($jsonFormat->property);
228 228
                 $format = "$method()";
229 229
             } else {
230 230
                 $stopRecursion = $this->findAnnotation(Annotation\JsonRecursive::class) ? '' : 'true';
@@ -280,10 +280,10 @@  discard block
 block discarded – undo
280 280
             } elseif ($descriptor instanceof ScalarBeanPropertyDescriptor) {
281 281
                 $rows[] = "'$indexName' => $propertyAccess->$columnGetterName()";
282 282
             } else {
283
-                throw new TDBMException('PropertyDescriptor of class `' . get_class($descriptor) . '` cannot be serialized.');
283
+                throw new TDBMException('PropertyDescriptor of class `'.get_class($descriptor).'` cannot be serialized.');
284 284
             }
285 285
         }
286
-        return '[' . implode(', ', $rows) . ']';
286
+        return '['.implode(', ', $rows).']';
287 287
     }
288 288
 
289 289
     private function getBeanPropertyDescriptor(string $column): AbstractBeanPropertyDescriptor
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                 return $descriptor;
297 297
             }
298 298
         }
299
-        throw new TDBMException('PropertyDescriptor for `'.$this->table->getName().'`.`' . $column . '` not found in `' . $this->foreignBeanDescriptor->getTable()->getName() . '`');
299
+        throw new TDBMException('PropertyDescriptor for `'.$this->table->getName().'`.`'.$column.'` not found in `'.$this->foreignBeanDescriptor->getTable()->getName().'`');
300 300
     }
301 301
 
302 302
     /**
Please login to merge, or discard this patch.