@@ -194,25 +194,25 @@ |
||
194 | 194 | $value = $repository->extractOne($entity, $attribute); |
195 | 195 | |
196 | 196 | if ($isUninitialized) { |
197 | - $this->fail($message . ': Expected attribute "'.$path.'" to be not initialised'); |
|
197 | + $this->fail($message.': Expected attribute "'.$path.'" to be not initialised'); |
|
198 | 198 | } |
199 | 199 | } catch (UninitializedPropertyException $e) { |
200 | 200 | if (!$isUninitialized) { |
201 | - $this->fail($message . ': The attribute "'.$path.'" is not initialised'); |
|
201 | + $this->fail($message.': The attribute "'.$path.'" is not initialised'); |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | |
205 | 205 | if (!is_object($expectedValue)) { |
206 | - $this->assertSame($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
206 | + $this->assertSame($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same'); |
|
207 | 207 | continue; |
208 | 208 | } |
209 | 209 | |
210 | 210 | if ($expectedValue instanceof Constraint) { |
211 | - $this->assertThat($value, $expectedValue, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
211 | + $this->assertThat($value, $expectedValue, $message.': Expected attribute "'.$path.'" is not the same'); |
|
212 | 212 | } elseif ($expectedValue instanceof \DateTimeInterface) { |
213 | - $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
213 | + $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message.': Expected attribute "'.$path.'" is not the same'); |
|
214 | 214 | } else { |
215 | - $this->assertEquals($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
215 | + $this->assertEquals($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same'); |
|
216 | 216 | } |
217 | 217 | } |
218 | 218 | } |
@@ -15,6 +15,6 @@ |
||
15 | 15 | */ |
16 | 16 | public function __construct(string $entity, string $field) |
17 | 17 | { |
18 | - parent::__construct('The field "' . $field . '" is not declared for the entity ' . $entity); |
|
18 | + parent::__construct('The field "'.$field.'" is not declared for the entity '.$entity); |
|
19 | 19 | } |
20 | 20 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | - throw new HydratorGenerationException($this->className, 'Cannot get the value of property "' . $attribute . '"'); |
|
92 | + throw new HydratorGenerationException($this->className, 'Cannot get the value of property "'.$attribute.'"'); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return $varName.'->set'.ucfirst($attribute).'('.$value.')'; |
119 | 119 | } |
120 | 120 | |
121 | - throw new HydratorGenerationException($this->className, 'Cannot access to attribute "' . $attribute . '" on write'); |
|
121 | + throw new HydratorGenerationException($this->className, 'Cannot access to attribute "'.$attribute.'" on write'); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | } |
166 | 166 | } catch (ReflectionException $e) { |
167 | - throw new HydratorGenerationException($this->className, 'Cannot access to the property ' . $prop, $e); |
|
167 | + throw new HydratorGenerationException($this->className, 'Cannot access to the property '.$prop, $e); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | return true; |
@@ -327,7 +327,7 @@ |
||
327 | 327 | return array_unique($classes); |
328 | 328 | |
329 | 329 | default: |
330 | - throw new HydratorGenerationException($this->mapper->getEntityClass(), 'Cannot handle relation type ' . $relation['type']); |
|
330 | + throw new HydratorGenerationException($this->mapper->getEntityClass(), 'Cannot handle relation type '.$relation['type']); |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $values = []; |
47 | 47 | $attributes = array_flip($attributes); |
48 | 48 | |
49 | - $privatePrefix = "\0" . get_class($object) . "\0"; |
|
49 | + $privatePrefix = "\0".get_class($object)."\0"; |
|
50 | 50 | $privatePrefixLen = strlen($privatePrefix); |
51 | 51 | |
52 | 52 | foreach ((array) $object as $name => $property) { |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | return $this->hydratorsCache[$entityClass]; |
84 | 84 | } |
85 | 85 | |
86 | - $hydrator = static function ($object, array $data) { |
|
86 | + $hydrator = static function($object, array $data) { |
|
87 | 87 | foreach ($data as $property => $value) { |
88 | 88 | try { |
89 | 89 | if (isset($object->$property) && $object->$property instanceof ImportableInterface && is_array($value)) { |
90 | 90 | $object->$property->import($value); |
91 | - } elseif (method_exists($object, 'set' . ucfirst($property))) { |
|
92 | - $object->{'set' . ucfirst($property)}($value); |
|
91 | + } elseif (method_exists($object, 'set'.ucfirst($property))) { |
|
92 | + $object->{'set'.ucfirst($property)}($value); |
|
93 | 93 | } elseif (property_exists($object, $property)) { |
94 | 94 | $object->$property = $value; |
95 | 95 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function hydratorClassName() |
127 | 127 | { |
128 | - return 'Hydrator_' . str_replace('\\', '_', $this->className); |
|
128 | + return 'Hydrator_'.str_replace('\\', '_', $this->className); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function hydratorFullClassName() |
137 | 137 | { |
138 | - return $this->hydratorNamespace() . '\\' . $this->hydratorClassName(); |
|
138 | + return $this->hydratorNamespace().'\\'.$this->hydratorClassName(); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | if (!isset($classes[$class])) { |
168 | 168 | $classes[$class] = true; |
169 | 169 | |
170 | - $property = '__' . str_replace('\\', '_', $class) . '_hydrator'; |
|
170 | + $property = '__'.str_replace('\\', '_', $class).'_hydrator'; |
|
171 | 171 | $this->embeddedHydrators[$class] = $property; |
172 | 172 | } |
173 | 173 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | protected function generateEmbeddedHydrate(AttributeInfo $attribute) |
274 | 274 | { |
275 | 275 | // We can have multiple entity classes for one attribute : morph |
276 | - $varName = '$__rel_' . str_replace('.', '_', $attribute->name()); |
|
276 | + $varName = '$__rel_'.str_replace('.', '_', $attribute->name()); |
|
277 | 277 | |
278 | 278 | $hydrators = []; |
279 | 279 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | return '$this'; |
309 | 309 | } |
310 | 310 | |
311 | - return '$this->' . $this->embeddedHydrators[$class]; |
|
311 | + return '$this->'.$this->embeddedHydrators[$class]; |
|
312 | 312 | } |
313 | 313 | |
314 | 314 | /** |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | */ |
321 | 321 | protected function normalizeClassName($className) |
322 | 322 | { |
323 | - return '\\' . ltrim($className, '\\'); |
|
323 | + return '\\'.ltrim($className, '\\'); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -373,11 +373,11 @@ discard block |
||
373 | 373 | } |
374 | 374 | |
375 | 375 | if (empty($possiblyNotInitialized)) { |
376 | - return 'return [' . implode(', ', $lines) . '];'; |
|
376 | + return 'return ['.implode(', ', $lines).'];'; |
|
377 | 377 | } |
378 | 378 | |
379 | - return '$values = [' . implode(', ', $lines) . '];' . PHP_EOL . PHP_EOL . |
|
380 | - implode(PHP_EOL, $possiblyNotInitialized) . PHP_EOL . PHP_EOL . |
|
379 | + return '$values = ['.implode(', ', $lines).'];'.PHP_EOL.PHP_EOL. |
|
380 | + implode(PHP_EOL, $possiblyNotInitialized).PHP_EOL.PHP_EOL. |
|
381 | 381 | 'return $values;' |
382 | 382 | ; |
383 | 383 | } |
@@ -439,8 +439,8 @@ discard block |
||
439 | 439 | $line = ''; |
440 | 440 | |
441 | 441 | if ($attribute->isEmbedded()) { |
442 | - $varName = '$__rel_' . str_replace('.', '_', $attribute->name()); |
|
443 | - $line .= '(' . $varName . ' = '.$this->accessor->getter('$object', $attribute->property()) . ") === null ? null : "; |
|
442 | + $varName = '$__rel_'.str_replace('.', '_', $attribute->name()); |
|
443 | + $line .= '('.$varName.' = '.$this->accessor->getter('$object', $attribute->property()).") === null ? null : "; |
|
444 | 444 | |
445 | 445 | foreach ($attribute->embedded()->classes() as $class) { |
446 | 446 | if ($this->resolver->isImportable($class)) { |
@@ -733,13 +733,13 @@ discard block |
||
733 | 733 | */ |
734 | 734 | protected function generateExtractOneCaseEmbedded(EmbeddedInfo $embedded) |
735 | 735 | { |
736 | - $varName = '$__' . str_replace('.', '_', $embedded->path()); |
|
736 | + $varName = '$__'.str_replace('.', '_', $embedded->path()); |
|
737 | 737 | $code = $this->accessors->embedded($embedded)->getEmbedded($varName, false); |
738 | 738 | $className = $embedded->isRoot() ? $this->mapper->getEntityClass() : $embedded->parent()->class(); |
739 | 739 | |
740 | 740 | return <<<PHP |
741 | 741 | try { |
742 | -{$this->code->indent($this->code->lines([$code, 'return ' . $varName . ';']), 1)} |
|
742 | +{$this->code->indent($this->code->lines([$code, 'return '.$varName.';']), 1)} |
|
743 | 743 | } catch (\Error \$e) { |
744 | 744 | throw new \Bdf\Prime\Entity\Hydrator\Exception\UninitializedPropertyException('{$className}', '{$embedded->property()}'); |
745 | 745 | } |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | ->fullSetter($attribute->property(), '$value', '$__embedded').';' |
795 | 795 | ; |
796 | 796 | } else { |
797 | - $code = $this->accessor->setter('$object', $attribute->property(), '$value', false) . ';'; |
|
797 | + $code = $this->accessor->setter('$object', $attribute->property(), '$value', false).';'; |
|
798 | 798 | } |
799 | 799 | |
800 | 800 | // Always surround with try catch because setter can also be typed |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $body = str_replace('<spaces>', $this->spaces, $body); |
387 | 387 | $last = strrpos($currentCode, '}'); |
388 | 388 | |
389 | - return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}\n"; |
|
389 | + return substr($currentCode, 0, $last).$body.(strlen($body) > 0 ? "\n" : '')."}\n"; |
|
390 | 390 | } |
391 | 391 | |
392 | 392 | /** |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | protected function generateEntityNamespace() |
396 | 396 | { |
397 | 397 | if ($this->hasNamespace($this->mapperInfo->className())) { |
398 | - return 'namespace ' . $this->getNamespace($this->mapperInfo->className()) .';' . "\n\n"; |
|
398 | + return 'namespace '.$this->getNamespace($this->mapperInfo->className()).';'."\n\n"; |
|
399 | 399 | } |
400 | 400 | } |
401 | 401 | |
@@ -409,18 +409,18 @@ discard block |
||
409 | 409 | $use = []; |
410 | 410 | |
411 | 411 | if ($this->hasNamespace($this->getClassToExtend())) { |
412 | - $use[$this->getClassToExtend()] = 'use ' . $this->getClassToExtend() . ';'; |
|
412 | + $use[$this->getClassToExtend()] = 'use '.$this->getClassToExtend().';'; |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | foreach ($this->interfaces as $interface) { |
416 | 416 | if ($this->hasNamespace($interface)) { |
417 | - $use[$interface] = 'use ' . $interface . ';'; |
|
417 | + $use[$interface] = 'use '.$interface.';'; |
|
418 | 418 | } |
419 | 419 | } |
420 | 420 | |
421 | 421 | foreach ($this->traits as $trait) { |
422 | 422 | if ($this->hasNamespace($trait)) { |
423 | - $use[$trait] = 'use ' . $trait . ';'; |
|
423 | + $use[$trait] = 'use '.$trait.';'; |
|
424 | 424 | } |
425 | 425 | } |
426 | 426 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | |
451 | 451 | sort($use); |
452 | 452 | |
453 | - return implode("\n", $use) . "\n\n"; |
|
453 | + return implode("\n", $use)."\n\n"; |
|
454 | 454 | } |
455 | 455 | |
456 | 456 | /** |
@@ -458,9 +458,9 @@ discard block |
||
458 | 458 | */ |
459 | 459 | protected function generateEntityClassName() |
460 | 460 | { |
461 | - return 'class ' . $this->getClassName($this->mapperInfo->className()) . |
|
462 | - ($this->classToExtend ? ' extends ' . $this->getClassToExtendName() : null) . |
|
463 | - ($this->interfaces ? ' implements ' . $this->getInterfacesToImplement() : null); |
|
461 | + return 'class '.$this->getClassName($this->mapperInfo->className()). |
|
462 | + ($this->classToExtend ? ' extends '.$this->getClassToExtendName() : null). |
|
463 | + ($this->interfaces ? ' implements '.$this->getInterfacesToImplement() : null); |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | /** |
@@ -475,10 +475,10 @@ discard block |
||
475 | 475 | $traits = ''; |
476 | 476 | |
477 | 477 | foreach ($this->traits as $trait) { |
478 | - $traits .= $this->spaces . 'use ' . $this->getRelativeClassName($trait) . ';' . "\n"; |
|
478 | + $traits .= $this->spaces.'use '.$this->getRelativeClassName($trait).';'."\n"; |
|
479 | 479 | } |
480 | 480 | |
481 | - return $traits . "\n"; |
|
481 | + return $traits."\n"; |
|
482 | 482 | } |
483 | 483 | |
484 | 484 | /** |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | { |
584 | 584 | $lines = array(); |
585 | 585 | $lines[] = '/**'; |
586 | - $lines[] = ' * ' . $this->getClassName($this->mapperInfo->className()); |
|
586 | + $lines[] = ' * '.$this->getClassName($this->mapperInfo->className()); |
|
587 | 587 | $lines[] = ' */'; |
588 | 588 | |
589 | 589 | return implode("\n", $lines); |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | |
684 | 684 | if (!$property->isRelation()) { |
685 | 685 | $lines[] = $this->generateEmbeddedPropertyDocBlock($property); |
686 | - $lines[] = $this->spaces . $this->fieldVisibility . $this->getPropertyTypeHintForObject($property) . ' $'.$property->name().";\n"; |
|
686 | + $lines[] = $this->spaces.$this->fieldVisibility.$this->getPropertyTypeHintForObject($property).' $'.$property->name().";\n"; |
|
687 | 687 | } else { |
688 | 688 | $name = $property->name(); |
689 | 689 | $default = ''; |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | } |
700 | 700 | |
701 | 701 | $lines[] = $this->generateEmbeddedPropertyDocBlock($property); |
702 | - $lines[] = $this->spaces . $this->fieldVisibility . $this->getPropertyTypeHintForObject($property) . ' $' . $name . $default .";\n"; |
|
702 | + $lines[] = $this->spaces.$this->fieldVisibility.$this->getPropertyTypeHintForObject($property).' $'.$name.$default.";\n"; |
|
703 | 703 | } |
704 | 704 | } |
705 | 705 | |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | $variableName = $this->inflector->camelize($fieldName); |
728 | 728 | $methodName = $variableName; |
729 | 729 | } else { |
730 | - $methodName = $type . $this->inflector->classify($fieldName); |
|
730 | + $methodName = $type.$this->inflector->classify($fieldName); |
|
731 | 731 | $variableName = $this->inflector->camelize($fieldName); |
732 | 732 | } |
733 | 733 | |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | |
745 | 745 | if ($propertyInfo->isObject()) { |
746 | 746 | $variableType = $this->getRelativeClassName($propertyInfo->className()); |
747 | - $methodTypeHint = $variableType.' '; |
|
747 | + $methodTypeHint = $variableType.' '; |
|
748 | 748 | } else { |
749 | 749 | $variableType = $propertyInfo->phpType(); |
750 | 750 | $methodTypeHint = null; |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | '<variableName>' => $variableName, |
774 | 774 | '<methodName>' => $methodName, |
775 | 775 | '<fieldName>' => $fieldName, |
776 | - '<variableDefault>' => ($defaultValue !== null ) ? (' = '.$defaultValue) : '' |
|
776 | + '<variableDefault>' => ($defaultValue !== null) ? (' = '.$defaultValue) : '' |
|
777 | 777 | ); |
778 | 778 | |
779 | 779 | $method = str_replace( |
@@ -848,9 +848,9 @@ discard block |
||
848 | 848 | protected function generateFieldMappingPropertyDocBlock($property) |
849 | 849 | { |
850 | 850 | $lines = array(); |
851 | - $lines[] = $this->spaces . '/**'; |
|
852 | - $lines[] = $this->spaces . ' * @var '.$property->phpType(); |
|
853 | - $lines[] = $this->spaces . ' */'; |
|
851 | + $lines[] = $this->spaces.'/**'; |
|
852 | + $lines[] = $this->spaces.' * @var '.$property->phpType(); |
|
853 | + $lines[] = $this->spaces.' */'; |
|
854 | 854 | |
855 | 855 | return implode("\n", $lines); |
856 | 856 | } |
@@ -879,9 +879,9 @@ discard block |
||
879 | 879 | } |
880 | 880 | |
881 | 881 | $lines = array(); |
882 | - $lines[] = $this->spaces . '/**'; |
|
883 | - $lines[] = $this->spaces . ' * @var '.$className; |
|
884 | - $lines[] = $this->spaces . ' */'; |
|
882 | + $lines[] = $this->spaces.'/**'; |
|
883 | + $lines[] = $this->spaces.' * @var '.$className; |
|
884 | + $lines[] = $this->spaces.' */'; |
|
885 | 885 | |
886 | 886 | return implode("\n", $lines); |
887 | 887 | } |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | |
923 | 923 | if ($inClass) { |
924 | 924 | $inClass = false; |
925 | - $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1]; |
|
925 | + $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1]; |
|
926 | 926 | $this->staticReflection[$lastSeenClass]['properties'] = array(); |
927 | 927 | $this->staticReflection[$lastSeenClass]['methods'] = array(); |
928 | 928 | } |
@@ -930,16 +930,16 @@ discard block |
||
930 | 930 | if ($token[0] == T_NAMESPACE) { |
931 | 931 | $lastSeenNamespace = ""; |
932 | 932 | $inNamespace = true; |
933 | - } elseif ($token[0] == T_CLASS && $tokens[$i-1][0] != T_DOUBLE_COLON) { |
|
933 | + } elseif ($token[0] == T_CLASS && $tokens[$i - 1][0] != T_DOUBLE_COLON) { |
|
934 | 934 | $inClass = true; |
935 | 935 | } elseif ($token[0] == T_FUNCTION) { |
936 | - if ($tokens[$i+2][0] == T_STRING) { |
|
937 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]); |
|
938 | - } elseif ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) { |
|
939 | - $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]); |
|
936 | + if ($tokens[$i + 2][0] == T_STRING) { |
|
937 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]); |
|
938 | + } elseif ($tokens[$i + 2] == "&" && $tokens[$i + 3][0] == T_STRING) { |
|
939 | + $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]); |
|
940 | 940 | } |
941 | - } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) { |
|
942 | - $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1); |
|
941 | + } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i + 2][0] != T_FUNCTION) { |
|
942 | + $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1); |
|
943 | 943 | } |
944 | 944 | } |
945 | 945 | } |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | if ($this->hasNamespace($className)) { |
1015 | 1015 | return $this->getClassName($className); |
1016 | 1016 | } else { |
1017 | - return '\\' . $className; |
|
1017 | + return '\\'.$className; |
|
1018 | 1018 | } |
1019 | 1019 | } |
1020 | 1020 | |
@@ -1115,8 +1115,8 @@ discard block |
||
1115 | 1115 | $lines = explode("\n", $code); |
1116 | 1116 | |
1117 | 1117 | foreach ($lines as $key => $value) { |
1118 | - if ( ! empty($value)) { |
|
1119 | - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; |
|
1118 | + if (!empty($value)) { |
|
1119 | + $lines[$key] = str_repeat($this->spaces, $num).$lines[$key]; |
|
1120 | 1120 | } |
1121 | 1121 | } |
1122 | 1122 | |
@@ -1145,7 +1145,7 @@ discard block |
||
1145 | 1145 | } |
1146 | 1146 | |
1147 | 1147 | if (is_string($value)) { |
1148 | - return "'" . $value . "'"; |
|
1148 | + return "'".$value."'"; |
|
1149 | 1149 | } |
1150 | 1150 | |
1151 | 1151 | if (is_bool($value)) { |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | $type = self::PROPERTY_TYPE_MAP[$type] ?? $type; |
1179 | 1179 | } |
1180 | 1180 | |
1181 | - return ($nullable ? '?' : '') . $type; |
|
1181 | + return ($nullable ? '?' : '').$type; |
|
1182 | 1182 | } |
1183 | 1183 | |
1184 | 1184 | /** |
@@ -1197,7 +1197,7 @@ discard block |
||
1197 | 1197 | return ''; |
1198 | 1198 | } |
1199 | 1199 | |
1200 | - return ' ' . $this->getPropertyTypeHint($property->phpType(), $property->isNullable()); |
|
1200 | + return ' '.$this->getPropertyTypeHint($property->phpType(), $property->isNullable()); |
|
1201 | 1201 | } |
1202 | 1202 | |
1203 | 1203 | /** |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | } |
1232 | 1232 | } |
1233 | 1233 | |
1234 | - return ' ' . $this->getPropertyTypeHint($type, $property->isRelation()); |
|
1234 | + return ' '.$this->getPropertyTypeHint($type, $property->isRelation()); |
|
1235 | 1235 | } |
1236 | 1236 | |
1237 | 1237 | //---------------------- mutators |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | public function setFieldVisibility(string $visibility): void |
1362 | 1362 | { |
1363 | 1363 | if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) { |
1364 | - throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility); |
|
1364 | + throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility); |
|
1365 | 1365 | } |
1366 | 1366 | |
1367 | 1367 | $this->fieldVisibility = $visibility; |