1919use PHPStan \Type \Constant \ConstantStringType ;
2020use PHPStan \Type \ConstantTypeHelper ;
2121use PHPStan \Type \Doctrine \DescriptorNotRegisteredException ;
22- use PHPStan \Type \Doctrine \DefaultDescriptorRegistry ;
22+ use PHPStan \Type \Doctrine \DescriptorRegistry ;
2323use PHPStan \Type \FloatType ;
2424use PHPStan \Type \GeneralizePrecision ;
2525use PHPStan \Type \IntegerRangeType ;
@@ -97,7 +97,7 @@ class QueryResultTypeWalker extends SqlWalker
9797 /** @var QueryResultTypeBuilder */
9898 private $ typeBuilder ;
9999
100- /** @var DefaultDescriptorRegistry */
100+ /** @var DescriptorRegistry */
101101 private $ descriptorRegistry ;
102102
103103 /** @var bool */
@@ -109,7 +109,7 @@ class QueryResultTypeWalker extends SqlWalker
109109 /**
110110 * @param Query<mixed> $query
111111 */
112- public static function walk (Query $ query , QueryResultTypeBuilder $ typeBuilder , DefaultDescriptorRegistry $ descriptorRegistry ): void
112+ public static function walk (Query $ query , QueryResultTypeBuilder $ typeBuilder , DescriptorRegistry $ descriptorRegistry ): void
113113 {
114114 $ query ->setHint (Query::HINT_CUSTOM_OUTPUT_WALKER , self ::class);
115115 $ query ->setHint (self ::HINT_TYPE_MAPPING , $ typeBuilder );
@@ -154,11 +154,11 @@ public function __construct($query, $parserResult, array $queryComponents)
154154
155155 $ descriptorRegistry = $ this ->query ->getHint (self ::HINT_DESCRIPTOR_REGISTRY );
156156
157- if (!$ descriptorRegistry instanceof DefaultDescriptorRegistry ) {
157+ if (!$ descriptorRegistry instanceof DescriptorRegistry ) {
158158 throw new ShouldNotHappenException (sprintf (
159159 'Expected the query hint %s to contain a %s, but got a %s ' ,
160160 self ::HINT_DESCRIPTOR_REGISTRY ,
161- DefaultDescriptorRegistry ::class,
161+ DescriptorRegistry ::class,
162162 is_object ($ descriptorRegistry ) ? get_class ($ descriptorRegistry ) : gettype ($ descriptorRegistry )
163163 ));
164164 }
0 commit comments