19
19
use PHPStan \Type \Constant \ConstantStringType ;
20
20
use PHPStan \Type \ConstantTypeHelper ;
21
21
use PHPStan \Type \Doctrine \DescriptorNotRegisteredException ;
22
- use PHPStan \Type \Doctrine \DefaultDescriptorRegistry ;
22
+ use PHPStan \Type \Doctrine \DescriptorRegistry ;
23
23
use PHPStan \Type \FloatType ;
24
24
use PHPStan \Type \GeneralizePrecision ;
25
25
use PHPStan \Type \IntegerRangeType ;
@@ -97,7 +97,7 @@ class QueryResultTypeWalker extends SqlWalker
97
97
/** @var QueryResultTypeBuilder */
98
98
private $ typeBuilder ;
99
99
100
- /** @var DefaultDescriptorRegistry */
100
+ /** @var DescriptorRegistry */
101
101
private $ descriptorRegistry ;
102
102
103
103
/** @var bool */
@@ -109,7 +109,7 @@ class QueryResultTypeWalker extends SqlWalker
109
109
/**
110
110
* @param Query<mixed> $query
111
111
*/
112
- public static function walk (Query $ query , QueryResultTypeBuilder $ typeBuilder , DefaultDescriptorRegistry $ descriptorRegistry ): void
112
+ public static function walk (Query $ query , QueryResultTypeBuilder $ typeBuilder , DescriptorRegistry $ descriptorRegistry ): void
113
113
{
114
114
$ query ->setHint (Query::HINT_CUSTOM_OUTPUT_WALKER , self ::class);
115
115
$ query ->setHint (self ::HINT_TYPE_MAPPING , $ typeBuilder );
@@ -154,11 +154,11 @@ public function __construct($query, $parserResult, array $queryComponents)
154
154
155
155
$ descriptorRegistry = $ this ->query ->getHint (self ::HINT_DESCRIPTOR_REGISTRY );
156
156
157
- if (!$ descriptorRegistry instanceof DefaultDescriptorRegistry ) {
157
+ if (!$ descriptorRegistry instanceof DescriptorRegistry ) {
158
158
throw new ShouldNotHappenException (sprintf (
159
159
'Expected the query hint %s to contain a %s, but got a %s ' ,
160
160
self ::HINT_DESCRIPTOR_REGISTRY ,
161
- DefaultDescriptorRegistry ::class,
161
+ DescriptorRegistry ::class,
162
162
is_object ($ descriptorRegistry ) ? get_class ($ descriptorRegistry ) : gettype ($ descriptorRegistry )
163
163
));
164
164
}
0 commit comments