1111
1212namespace Symfony \Component \Ldap \Adapter \ExtLdap ;
1313
14+ use LDAP \Connection as LDAPConnection ;
15+ use LDAP \Result ;
1416use Symfony \Component \Ldap \Adapter \AbstractQuery ;
1517use Symfony \Component \Ldap \Exception \LdapException ;
1618use Symfony \Component \Ldap \Exception \NotBoundException ;
@@ -27,7 +29,7 @@ class Query extends AbstractQuery
2729 /** @var Connection */
2830 protected $ connection ;
2931
30- /** @var resource[] */
32+ /** @var resource[]|Result[] */
3133 private $ results ;
3234
3335 /** @var array */
@@ -156,7 +158,7 @@ public function execute()
156158 * Returns an LDAP search resource. If this query resulted in multiple searches, only the first
157159 * page will be returned.
158160 *
159- * @return resource
161+ * @return resource|Result
160162 *
161163 * @internal
162164 */
@@ -172,7 +174,7 @@ public function getResource($idx = 0)
172174 /**
173175 * Returns all LDAP search resources.
174176 *
175- * @return resource[]
177+ * @return resource[]|Result[]
176178 *
177179 * @internal
178180 */
@@ -215,7 +217,7 @@ private function resetPagination()
215217 /**
216218 * Sets LDAP pagination controls.
217219 *
218- * @param resource $con
220+ * @param resource|LDAPConnection $con
219221 */
220222 private function controlPagedResult ($ con , int $ pageSize , bool $ critical , string $ cookie ): bool
221223 {
@@ -239,8 +241,8 @@ private function controlPagedResult($con, int $pageSize, bool $critical, string
239241 /**
240242 * Retrieve LDAP pagination cookie.
241243 *
242- * @param resource $con
243- * @param resource $result
244+ * @param resource|LDAPConnection $con
245+ * @param resource|Result $result
244246 */
245247 private function controlPagedResultResponse ($ con , $ result , string $ cookie = '' ): string
246248 {
@@ -257,9 +259,9 @@ private function controlPagedResultResponse($con, $result, string $cookie = ''):
257259 /**
258260 * Calls actual LDAP search function with the prepared options and parameters.
259261 *
260- * @param resource $con
262+ * @param resource|LDAPConnection $con
261263 *
262- * @return resource
264+ * @return resource|Result
263265 */
264266 private function callSearchFunction ($ con , string $ func , int $ sizeLimit )
265267 {
0 commit comments