Skip to content

Commit 653ede6

Browse files
committed
Fix psalm issues
1 parent 26a7206 commit 653ede6

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

lib/Connector/Ldap.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
use SimpleSAML\Error;
99
use SimpleSAML\Logger;
1010
use SimpleSAML\Module\ldap\ConnectorInterface;
11+
use Symfony\Component\Ldap\Adapter\AdapterInterface;
1112
use Symfony\Component\Ldap\Adapter\ExtLdap\Adapter;
1213
use Symfony\Component\Ldap\Entry;
14+
use Symfony\Component\Ldap\Exception\LdapException;
1315
use Symfony\Component\Ldap\Exception\InvalidCredentialsException;
1416
use Symfony\Component\Ldap\Ldap as LdapObject;
1517

@@ -26,9 +28,9 @@ class Ldap implements ConnectorInterface
2628
use LdapHelpers;
2729

2830
/**
29-
* @var \Symfony\Component\Ldap\Adapter
31+
* @var \Symfony\Component\Ldap\Adapter\AdapterInterface
3032
*/
31-
protected Adapter $adapter;
33+
protected AdapterInterface $adapter;
3234

3335
/**
3436
* @var \Symfony\Component\Ldap\Ldap
@@ -82,9 +84,9 @@ public function __construct(
8284

8385

8486
/**
85-
* @return \Symfony\Component\Ldap\Adapter
87+
* @return \Symfony\Component\Ldap\Adapter\AdapterInterface
8688
*/
87-
public function getAdapter(): Adapter
89+
public function getAdapter(): AdapterInterface
8890
{
8991
return $this->adapter;
9092
}

lib/ConnectorInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace SimpleSAML\Module\ldap;
44

5+
use Symfony\Component\Ldap\Adapter\AdapterInterface;
56
use Symfony\Component\Ldap\Entry;
67

78
interface ConnectorInterface
@@ -59,4 +60,10 @@ public function searchForMultiple(
5960
array $options,
6061
bool $allowMissing
6162
): array;
63+
64+
65+
/**
66+
* @return \Symfony\Component\Ldap\Adapter\AdapterInterface
67+
*/
68+
public function getAdapter(): AdapterInterface;
6269
}

0 commit comments

Comments
 (0)