118118use function in_array ;
119119use function sprintf ;
120120use function strpos ;
121- use function substr ;
122121use function strtolower ;
122+ use function substr ;
123123use function trim ;
124124
125125final class TypeResolver
@@ -358,7 +358,6 @@ function (TypeNode $nestedType) use ($context): Type {
358358 return new This ();
359359
360360 case ConditionalTypeNode::class:
361- /** @var ConditionalTypeNode $type */
362361 return new Conditional (
363362 $ type ->negated ,
364363 $ this ->createType ($ type ->subjectType , $ context ),
@@ -368,7 +367,6 @@ function (TypeNode $nestedType) use ($context): Type {
368367 );
369368
370369 case ConditionalTypeForParameterNode::class:
371- /** @var ConditionalTypeForParameterNode $type */
372370 return new ConditionalForParameter (
373371 $ type ->negated ,
374372 substr ($ type ->parameterName , 1 ),
@@ -378,7 +376,6 @@ function (TypeNode $nestedType) use ($context): Type {
378376 );
379377
380378 case OffsetAccessTypeNode::class:
381- /** @var OffsetAccessTypeNode $type */
382379 return new OffsetAccess (
383380 $ this ->createType ($ type ->type , $ context ),
384381 $ this ->createType ($ type ->offset , $ context )
@@ -547,7 +544,7 @@ private function resolveSingleType(string $type, Context $context): object
547544 case $ this ->isPartialStructuralElementName ($ type ):
548545 return $ this ->resolveTypedObject ($ type , $ context );
549546
550- // @codeCoverageIgnoreStart
547+ // @codeCoverageIgnoreStart
551548 default :
552549 // I haven't got the foggiest how the logic would come here but added this as a defense.
553550 throw new RuntimeException (
@@ -568,15 +565,15 @@ public function addKeyword(string $keyword, string $typeClassName): void
568565 if (!class_exists ($ typeClassName )) {
569566 throw new InvalidArgumentException (
570567 'The Value Object that needs to be created with a keyword " ' . $ keyword . '" must be an existing class '
571- . ' but we could not find the class ' . $ typeClassName
568+ . ' but we could not find the class ' . $ typeClassName
572569 );
573570 }
574571
575572 $ interfaces = class_implements ($ typeClassName );
576573 if ($ interfaces === false ) {
577574 throw new InvalidArgumentException (
578575 'The Value Object that needs to be created with a keyword " ' . $ keyword . '" must be an existing class '
579- . ' but we could not find the class ' . $ typeClassName
576+ . ' but we could not find the class ' . $ typeClassName
580577 );
581578 }
582579
0 commit comments