File tree Expand file tree Collapse file tree
src/TypeSystem/Scope/ComponentScope Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ final class ComponentScope implements ScopeInterface
3434{
3535 public function __construct (
3636 private readonly ComponentDeclarationNode $ componentDeclarationNode ,
37- private readonly ? ScopeInterface $ parentScope
37+ private readonly ScopeInterface $ parentScope
3838 ) {
3939 }
4040
@@ -46,15 +46,11 @@ public function lookupTypeFor(string $name): ?TypeInterface
4646 return $ this ->resolveTypeReference ($ typeReferenceNode );
4747 }
4848
49- return $ this ->parentScope ? ->lookupTypeFor($ name ) ?? null ;
49+ return $ this ->parentScope ->lookupTypeFor ($ name );
5050 }
5151
5252 public function resolveTypeReference (TypeReferenceNode $ typeReferenceNode ): TypeInterface
5353 {
54- if ($ this ->parentScope ) {
55- return $ this ->parentScope ->resolveTypeReference ($ typeReferenceNode );
56- }
57-
58- throw new \Exception ('@TODO: Unknown Type ' . $ typeReferenceNode ->name );
54+ return $ this ->parentScope ->resolveTypeReference ($ typeReferenceNode );
5955 }
6056}
You can’t perform that action at this time.
0 commit comments