From 57f3023ec4fec832d8386d83cb02bf58def01c24 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 3 Jul 2014 16:20:45 +0200 Subject: [PATCH] Fix coding style --- .../Config/Authentication/LdapBackendForm.php | 4 ++-- .../Backend/LdapUserBackend.php | 20 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php index 051b3c0c0..9112f8324 100644 --- a/application/forms/Config/Authentication/LdapBackendForm.php +++ b/application/forms/Config/Authentication/LdapBackendForm.php @@ -160,7 +160,7 @@ class LdapBackendForm extends BaseBackendForm */ public function isValidAuthenticationBackend() { - if (!ResourceFactory::ldapAvailable()) { + if (! ResourceFactory::ldapAvailable()) { /* * It should be possible to run icingaweb without the php ldap extension, when * no ldap backends are needed. When the user tries to create an ldap backend @@ -187,7 +187,7 @@ class LdapBackendForm extends BaseBackendForm */ } catch (Exception $exc) { $this->addErrorMessage( - t('Connection Validation Failed: ' . $exc->getMessage()) + t('Connection Validation Failed: ' . $exc->getMessage()) ); return false; } diff --git a/library/Icinga/Authentication/Backend/LdapUserBackend.php b/library/Icinga/Authentication/Backend/LdapUserBackend.php index cc9ab686d..22995c708 100644 --- a/library/Icinga/Authentication/Backend/LdapUserBackend.php +++ b/library/Icinga/Authentication/Backend/LdapUserBackend.php @@ -91,20 +91,24 @@ class LdapUserBackend extends UserBackend { $q = $this->conn->select()->from($this->userClass); $result = $q->fetchRow(); - if (!isset($result)) { + if (! isset($result)) { throw new AuthenticationException( - sprintf('No objects with objectClass="%s" in DN="%s" found.', - $this->userClass, - $this->conn->getDN() - )); + sprintf( + 'No objects with objectClass="%s" in DN="%s" found.', + $this->userClass, + $this->conn->getDN() + ) + ); } - if (!isset($result->{$this->userNameAttribute})) { + if (! isset($result->{$this->userNameAttribute})) { throw new AuthenticationException( - sprintf('UserNameAttribute "%s" not existing in objectClass="%s"', + sprintf( + 'UserNameAttribute "%s" not existing in objectClass="%s"', $this->userNameAttribute, $this->userClass - )); + ) + ); } }