@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | if (!\is_object($object)) { |
| 74 | 74 | throw new \InvalidArgumentException( |
| 75 | - 'JsonMapper::map() requires second argument to be an object, ' . \gettype($object) . ' given.' |
|
| 75 | + 'JsonMapper::map() requires second argument to be an object, '.\gettype($object).' given.' |
|
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $type = $this->removeNullable($type); |
| 122 | 122 | } elseif ($jsonValue === null) { |
| 123 | 123 | throw new \InvalidArgumentException( |
| 124 | - 'JSON property "' . $key . '" in class "' . $strClassName . '" must not be NULL' |
|
| 124 | + 'JSON property "'.$key.'" in class "'.$strClassName.'" must not be NULL' |
|
| 125 | 125 | ); |
| 126 | 126 | } |
| 127 | 127 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | if ($this->isSimpleType($type)) { |
| 149 | 149 | if ($type === 'string' && \is_object($jsonValue)) { |
| 150 | 150 | throw new \InvalidArgumentException( |
| 151 | - 'JSON property "' . $key . '" in class "' . $strClassName . '" is an object and cannot be converted to a string' |
|
| 151 | + 'JSON property "'.$key.'" in class "'.$strClassName.'" is an object and cannot be converted to a string' |
|
| 152 | 152 | ); |
| 153 | 153 | } |
| 154 | 154 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | if ($type === '') { |
| 171 | 171 | throw new \InvalidArgumentException( |
| 172 | - 'Empty type at property "' . $strClassName . '::$' . $key . '"' |
|
| 172 | + 'Empty type at property "'.$strClassName.'::$'.$key.'"' |
|
| 173 | 173 | ); |
| 174 | 174 | } |
| 175 | 175 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $this->isScalarType(\gettype($jsonValue)) |
| 204 | 204 | ) { |
| 205 | 205 | throw new \InvalidArgumentException( |
| 206 | - 'JSON property "' . $key . '" must be an array, ' . \gettype($jsonValue) . ' given' |
|
| 206 | + 'JSON property "'.$key.'" must be an array, '.\gettype($jsonValue).' given' |
|
| 207 | 207 | ); |
| 208 | 208 | } |
| 209 | 209 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | } |
| 304 | 304 | } elseif ($this->isScalarType($class)) { |
| 305 | 305 | throw new \InvalidArgumentException( |
| 306 | - 'JSON property "' . ($parent_key ?: '?') . '" is an array of type "' . $class . '" but contained a value of type "' . \gettype($jsonValue) . '"' |
|
| 306 | + 'JSON property "'.($parent_key ?: '?').'" is an array of type "'.$class.'" but contained a value of type "'.\gettype($jsonValue).'"' |
|
| 307 | 307 | ); |
| 308 | 308 | } elseif (\is_a($class, \ArrayObject::class, true)) { |
| 309 | 309 | /** @noinspection PhpSillyAssignmentInspection - phpstan helper */ |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | //create a full qualified namespace |
| 362 | - return '\\' . $strNs . '\\' . $type; |
|
| 362 | + return '\\'.$strNs.'\\'.$type; |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | /** |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | */ |
| 664 | 664 | private function isNullable($type): bool |
| 665 | 665 | { |
| 666 | - return \stripos('|' . $type . '|', '|null|') !== false; |
|
| 666 | + return \stripos('|'.$type.'|', '|null|') !== false; |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | /** |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | } |
| 681 | 681 | |
| 682 | 682 | return \substr( |
| 683 | - \str_ireplace('|null|', '|', '|' . $type . '|'), |
|
| 683 | + \str_ireplace('|null|', '|', '|'.$type.'|'), |
|
| 684 | 684 | 1, |
| 685 | 685 | -1 |
| 686 | 686 | ); |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | $constructor->getNumberOfRequiredParameters() > 0 |
| 729 | 729 | ) { |
| 730 | 730 | /** @phpstan-var TClass $return */ |
| 731 | - $return = $reflectClass->newInstanceWithoutConstructor(); |
|
| 731 | + $return = $reflectClass->newInstanceWithoutConstructor(); |
|
| 732 | 732 | } else { |
| 733 | 733 | /** @phpstan-var TClass $return */ |
| 734 | 734 | $return = $reflectClass->newInstance(); |