diff --git a/src/Authenticators/LDAPAuthenticator.php b/src/Authenticators/LDAPAuthenticator.php index 1ea1097..a97374b 100644 --- a/src/Authenticators/LDAPAuthenticator.php +++ b/src/Authenticators/LDAPAuthenticator.php @@ -83,7 +83,6 @@ public static function get_login_form(Controller $controller) public function authenticate(array $data, HTTPRequest $request, ValidationResult &$result = null) { $result = $result ?: ValidationResult::create(); - /** @var LDAPService $service */ $service = Injector::inst()->get(LDAPService::class); $login = trim($data['Login'] ?? ''); if (Email::is_valid_address($login)) { @@ -224,13 +223,11 @@ public function checkPassword(Member $member, $password, ValidationResult &$resu { $result = $result ?: ValidationResult::create(); - /** @var LDAPService $service */ $service = Injector::inst()->get(LDAPService::class); // Support email or username $handle = Config::inst()->get(self::class, 'allow_email_login') === 'yes' ? 'Email' : 'Username'; - /** @var array $ldapResult */ $ldapResult = $service->authenticate($member->{$handle}, $password); if (empty($ldapResult['success'])) { diff --git a/src/Control/LDAPDebugController.php b/src/Control/LDAPDebugController.php index c6e8b22..271bb2f 100644 --- a/src/Control/LDAPDebugController.php +++ b/src/Control/LDAPDebugController.php @@ -3,6 +3,7 @@ namespace SilverStripe\LDAP\Control; use SilverStripe\CMS\Controllers\ContentController; +use SilverStripe\CMS\Model\SiteTree; use SilverStripe\Control\HTTPRequest; use SilverStripe\Core\Config\Config; use SilverStripe\LDAP\Model\LDAPGateway; @@ -18,6 +19,8 @@ * Class LDAPDebugController * * This controller is used to debug the LDAP connection. + * + * @extends ContentController */ class LDAPDebugController extends ContentController { diff --git a/src/Extensions/LDAPGroupExtension.php b/src/Extensions/LDAPGroupExtension.php index 2a7098c..6f9c229 100644 --- a/src/Extensions/LDAPGroupExtension.php +++ b/src/Extensions/LDAPGroupExtension.php @@ -15,7 +15,10 @@ * Class LDAPGroupExtension * * Adds a field to map an LDAP group to a SilverStripe {@link Group} + * * @method SilverStripe\ORM\HasManyList LDAPGroupMappings() + * + * @extends DataExtension */ class LDAPGroupExtension extends DataExtension { diff --git a/src/Extensions/LDAPMemberExtension.php b/src/Extensions/LDAPMemberExtension.php index c64ef07..7f468c9 100644 --- a/src/Extensions/LDAPMemberExtension.php +++ b/src/Extensions/LDAPMemberExtension.php @@ -12,13 +12,14 @@ use SilverStripe\ORM\DataExtension; use SilverStripe\ORM\ValidationException; use SilverStripe\ORM\ValidationResult; +use SilverStripe\Security\Member; /** * Class LDAPMemberExtension. * * Adds mappings from AD attributes to SilverStripe {@link Member} fields. * - * @package activedirectory + * @extends DataExtension */ class LDAPMemberExtension extends DataExtension { diff --git a/src/Services/LDAPService.php b/src/Services/LDAPService.php index 211f887..2d8f019 100644 --- a/src/Services/LDAPService.php +++ b/src/Services/LDAPService.php @@ -133,7 +133,6 @@ public static function get_cache() */ public static function flush() { - /** @var CacheInterface $cache */ $cache = self::get_cache(); $cache->clear(); }