@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $return = TypeCheckArray::create( |
| 25 | 25 | [ |
| 26 | 26 | Arrayy::ARRAYY_HELPER_TYPES_FOR_ALL_PROPERTIES => new TypeCheckCallback( |
| 27 | - static function ($value) { |
|
| 27 | + static function($value) { |
|
| 28 | 28 | return \is_numeric($value); |
| 29 | 29 | } |
| 30 | 30 | ), |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $return = TypeCheckArray::create( |
| 25 | 25 | [ |
| 26 | 26 | Arrayy::ARRAYY_HELPER_TYPES_FOR_ALL_PROPERTIES => new TypeCheckCallback( |
| 27 | - static function ($value) { |
|
| 27 | + static function($value) { |
|
| 28 | 28 | return \is_string($value) && $value !== ''; |
| 29 | 29 | } |
| 30 | 30 | ), |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if ($type instanceof \phpDocumentor\Reflection\Types\Array_) { |
| 118 | 118 | $valueTypeTmp = $type->getValueType()->__toString(); |
| 119 | 119 | if ($valueTypeTmp !== 'mixed') { |
| 120 | - return $valueTypeTmp . '[]'; |
|
| 120 | + return $valueTypeTmp.'[]'; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | return 'array'; |
@@ -175,6 +175,6 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function throwException($expectedTypes, $value, $type): \Throwable |
| 177 | 177 | { |
| 178 | - throw new \TypeError("Invalid type: expected \"{$this->property_name}\" to be of type {{$expectedTypes}}, instead got value \"" . $this->valueToString($value) . '" (' . \print_r($value, true) . ") with type {{$type}}."); |
|
| 178 | + throw new \TypeError("Invalid type: expected \"{$this->property_name}\" to be of type {{$expectedTypes}}, instead got value \"".$this->valueToString($value).'" ('.\print_r($value, true).") with type {{$type}}."); |
|
| 179 | 179 | } |
| 180 | 180 | } |