11
11
12
12
namespace Symfony \Component \Ldap \Adapter \ExtLdap ;
13
13
14
+ use LDAP \Connection as LDAPConnection ;
15
+ use LDAP \Result ;
14
16
use Symfony \Component \Ldap \Adapter \AbstractQuery ;
15
17
use Symfony \Component \Ldap \Exception \LdapException ;
16
18
use Symfony \Component \Ldap \Exception \NotBoundException ;
@@ -27,7 +29,7 @@ class Query extends AbstractQuery
27
29
/** @var Connection */
28
30
protected $ connection ;
29
31
30
- /** @var resource[] */
32
+ /** @var resource[]|Result[] */
31
33
private $ results ;
32
34
33
35
/** @var array */
@@ -156,7 +158,7 @@ public function execute()
156
158
* Returns an LDAP search resource. If this query resulted in multiple searches, only the first
157
159
* page will be returned.
158
160
*
159
- * @return resource
161
+ * @return resource|Result
160
162
*
161
163
* @internal
162
164
*/
@@ -172,7 +174,7 @@ public function getResource(int $idx = 0)
172
174
/**
173
175
* Returns all LDAP search resources.
174
176
*
175
- * @return resource[]
177
+ * @return resource[]|Result[]
176
178
*
177
179
* @internal
178
180
*/
@@ -215,7 +217,7 @@ private function resetPagination()
215
217
/**
216
218
* Sets LDAP pagination controls.
217
219
*
218
- * @param resource $con
220
+ * @param resource|LDAPConnection $con
219
221
*/
220
222
private function controlPagedResult ($ con , int $ pageSize , bool $ critical , string $ cookie ): bool
221
223
{
@@ -239,8 +241,8 @@ private function controlPagedResult($con, int $pageSize, bool $critical, string
239
241
/**
240
242
* Retrieve LDAP pagination cookie.
241
243
*
242
- * @param resource $con
243
- * @param resource $result
244
+ * @param resource|LDAPConnection $con
245
+ * @param resource|Result $result
244
246
*/
245
247
private function controlPagedResultResponse ($ con , $ result , string $ cookie = '' ): string
246
248
{
@@ -257,9 +259,9 @@ private function controlPagedResultResponse($con, $result, string $cookie = ''):
257
259
/**
258
260
* Calls actual LDAP search function with the prepared options and parameters.
259
261
*
260
- * @param resource $con
262
+ * @param resource|LDAPConnection $con
261
263
*
262
- * @return resource
264
+ * @return resource|Result
263
265
*/
264
266
private function callSearchFunction ($ con , string $ func , int $ sizeLimit )
265
267
{
0 commit comments