Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/Mappers/Parameters/TypeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function mapReturnType(
$refMethod,
$docBlockObj,
);
assert(! $type instanceof InputType);
assert($type instanceof OutputType);
} catch (CannotMapTypeExceptionInterface $e) {
$e->addReturnInfo($refMethod);
throw $e;
Expand Down Expand Up @@ -160,7 +160,12 @@ private function getDocBlockPropertyType(DocBlock $docBlock, ReflectionProperty
return reset($varTags)->getType();
}

public function mapParameter(ReflectionParameter $parameter, DocBlock $docBlock, Type|null $paramTagType, ParameterAnnotations $parameterAnnotations): ParameterInterface
public function mapParameter(
ReflectionParameter $parameter,
DocBlock $docBlock,
Type|null $paramTagType,
ParameterAnnotations $parameterAnnotations,
): ParameterInterface
{
$hideParameter = $parameterAnnotations->getAnnotationByType(HideParameter::class);
if ($hideParameter) {
Expand Down Expand Up @@ -327,7 +332,7 @@ public function mapInputProperty(
$inputType = $this->typeResolver->mapNameToInputType($inputTypeName);
} else {
$inputType = $this->mapPropertyType($refProperty, $docBlock, true, $argumentName, $isNullable);
assert(! $inputType instanceof OutputType);
assert($inputType instanceof InputType);
}

$hasDefault = $defaultValue !== null || $isNullable;
Expand Down
Loading