@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | { |
| 104 | 104 | // defensive programming! |
| 105 | 105 | RequireObject::check($data, E4xx_UnsupportedType::class); |
| 106 | - RequireAnyOneOf::check([ new IsObject, new IsStringy], [$constraint], E4xx_UnsupportedType::class); |
|
| 106 | + RequireAnyOneOf::check([new IsObject, new IsStringy], [$constraint], E4xx_UnsupportedType::class); |
|
| 107 | 107 | |
| 108 | 108 | // this is the easiest test case of all :) |
| 109 | 109 | return $data instanceof $constraint; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | { |
| 125 | 125 | // defensive programming! |
| 126 | 126 | RequireStringy::check($data, E4xx_UnsupportedType::class); |
| 127 | - RequireAnyOneOf::check([ new IsObject, new IsStringy], [$constraint], E4xx_UnsupportedType::class); |
|
| 127 | + RequireAnyOneOf::check([new IsObject, new IsStringy], [$constraint], E4xx_UnsupportedType::class); |
|
| 128 | 128 | |
| 129 | 129 | $compatibleTypes = AllMatchingTypesList::fromClass($data); |
| 130 | 130 | if (is_object($constraint)) { |
@@ -147,6 +147,9 @@ discard block |
||
| 147 | 147 | return $retval; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | + /** |
|
| 151 | + * @param string $className |
|
| 152 | + */ |
|
| 150 | 153 | private static function buildCombinedClassNameDetails($className) |
| 151 | 154 | { |
| 152 | 155 | if (class_exists($className)) { |
@@ -332,7 +335,7 @@ discard block |
||
| 332 | 335 | * |
| 333 | 336 | * @param mixed $item |
| 334 | 337 | * the item to examine |
| 335 | - * @return array |
|
| 338 | + * @return string[] |
|
| 336 | 339 | * the basic type of the examined item |
| 337 | 340 | */ |
| 338 | 341 | private static function fromString($item) |
@@ -359,7 +362,7 @@ discard block |
||
| 359 | 362 | * |
| 360 | 363 | * @param mixed $item |
| 361 | 364 | * the item to examine |
| 362 | - * @return array |
|
| 365 | + * @return string[] |
|
| 363 | 366 | * the list of type(s) that this item can be |
| 364 | 367 | */ |
| 365 | 368 | public function __invoke($item) |