1515use PHPStan \Type \UnionType ;
1616use staabm \PHPStanDba \DbaException ;
1717use staabm \PHPStanDba \Error ;
18+ use staabm \PHPStanDba \UnresolvableQueryException ;
1819
1920final class QueryReflection
2021{
@@ -67,6 +68,8 @@ public function getResultType(string $queryString, int $fetchType): ?Type
6768 }
6869
6970 /**
71+ * @throws UnresolvableQueryException
72+ *
7073 * @return iterable<string>
7174 */
7275 public function resolvePreparedQueryStrings (Expr $ queryExpr , Type $ parameterTypes , Scope $ scope ): iterable
@@ -94,6 +97,9 @@ public function resolvePreparedQueryStrings(Expr $queryExpr, Type $parameterType
9497 }
9598 }
9699
100+ /**
101+ * @throws UnresolvableQueryException
102+ */
97103 public function resolvePreparedQueryString (Expr $ queryExpr , Type $ parameterTypes , Scope $ scope ): ?string
98104 {
99105 $ queryString = $ this ->resolveQueryString ($ queryExpr , $ scope );
@@ -111,6 +117,8 @@ public function resolvePreparedQueryString(Expr $queryExpr, Type $parameterTypes
111117 }
112118
113119 /**
120+ * @throws UnresolvableQueryException
121+ *
114122 * @return iterable<string>
115123 */
116124 public function resolveQueryStrings (Expr $ queryExpr , Scope $ scope ): iterable
@@ -131,6 +139,9 @@ public function resolveQueryStrings(Expr $queryExpr, Scope $scope): iterable
131139 }
132140 }
133141
142+ /**
143+ * @throws UnresolvableQueryException
144+ */
134145 public function resolveQueryString (Expr $ queryExpr , Scope $ scope ): ?string
135146 {
136147 if ($ queryExpr instanceof Concat) {
@@ -164,6 +175,8 @@ public static function getQueryType(string $query): ?string
164175 }
165176
166177 /**
178+ * @throws UnresolvableQueryException
179+ *
167180 * @return array<string|int, scalar|null>|null
168181 */
169182 public function resolveParameters (Type $ parameterTypes ): ?array
0 commit comments