diff --git a/src/Node.php b/src/Node.php index 92305b037..00f5c37a3 100644 --- a/src/Node.php +++ b/src/Node.php @@ -128,9 +128,9 @@ public function getLdap() if ($this->ldap === null) { throw new Exception\LdapException(null, 'No LDAP connection specified.', Exception\LdapException::LDAP_OTHER); - } else { - return $this->ldap; } + + return $this->ldap; } /** @@ -816,9 +816,9 @@ protected function assertChangeableAttribute($name) throw new Exception\LdapException(null, 'Cannot change attribute because it\'s part of the RDN'); } elseif (in_array($name, static::$systemAttributes)) { throw new Exception\LdapException(null, 'Cannot change attribute because it\'s read-only'); - } else { - return true; } + + return true; } /** diff --git a/src/Node/AbstractNode.php b/src/Node/AbstractNode.php index 6f0bf4d23..2ababefc3 100644 --- a/src/Node/AbstractNode.php +++ b/src/Node/AbstractNode.php @@ -259,9 +259,9 @@ public function getData($includeSystemAttributes = true) } } return $data; - } else { - return $this->currentData; } + + return $this->currentData; } /** @@ -286,9 +286,9 @@ public function existsAttribute($name, $emptyExists = false) } return count($this->currentData[$name]) > 0; - } else { - return false; } + + return false; } /** @@ -317,9 +317,9 @@ public function getAttribute($name, $index = null) { if ($name == 'dn') { return $this->getDnString(); - } else { - return Ldap\Attribute::getAttribute($this->currentData, $name, $index); } + + return Ldap\Attribute::getAttribute($this->currentData, $name, $index); } /** diff --git a/src/Node/ChildrenIterator.php b/src/Node/ChildrenIterator.php index 7f7cc4ed4..3cbfe0879 100644 --- a/src/Node/ChildrenIterator.php +++ b/src/Node/ChildrenIterator.php @@ -112,9 +112,9 @@ public function hasChildren() { if ($this->current() instanceof Ldap\Node) { return $this->current()->hasChildren(); - } else { - return false; } + + return false; } /** @@ -126,9 +126,9 @@ public function getChildren() { if ($this->current() instanceof Ldap\Node) { return $this->current()->getChildren(); - } else { - return null; } + + return null; } /** @@ -142,9 +142,9 @@ public function offsetGet($rdn) { if ($this->offsetExists($rdn)) { return $this->data[$rdn]; - } else { - return null; } + + return null; } /** diff --git a/src/Node/RootDse.php b/src/Node/RootDse.php index e1e94c7ec..b594f58f6 100644 --- a/src/Node/RootDse.php +++ b/src/Node/RootDse.php @@ -44,9 +44,9 @@ public static function create(Ldap\Ldap $ldap) && $data['structuralobjectclass'][0] === 'OpenLDAProotDSE' ) { return new RootDse\OpenLdap($dn, $data); - } else { - return new self($dn, $data); } + + return new self($dn, $data); } /** diff --git a/src/Node/Schema/AbstractItem.php b/src/Node/Schema/AbstractItem.php index 12b703b0f..ce6a758d2 100644 --- a/src/Node/Schema/AbstractItem.php +++ b/src/Node/Schema/AbstractItem.php @@ -71,9 +71,9 @@ public function __get($name) { if (array_key_exists($name, $this->data)) { return $this->data[$name]; - } else { - return null; } + + return null; } /** diff --git a/src/Node/Schema/AttributeType/OpenLdap.php b/src/Node/Schema/AttributeType/OpenLdap.php index b2378d42f..d9474cf44 100644 --- a/src/Node/Schema/AttributeType/OpenLdap.php +++ b/src/Node/Schema/AttributeType/OpenLdap.php @@ -56,9 +56,9 @@ public function getSyntax() } else { return $parent->getSyntax(); } - } else { - return $this->syntax; } + + return $this->syntax; } /** @@ -76,9 +76,9 @@ public function getMaxLength() } else { return $parent->getMaxLength(); } - } else { - return (int) $maxLength; } + + return (int) $maxLength; } /** diff --git a/src/Node/Schema/ObjectClass/OpenLdap.php b/src/Node/Schema/ObjectClass/OpenLdap.php index 4b2e97c16..205e1c12a 100644 --- a/src/Node/Schema/ObjectClass/OpenLdap.php +++ b/src/Node/Schema/ObjectClass/OpenLdap.php @@ -128,9 +128,9 @@ public function getType() return Schema::OBJECTCLASS_TYPE_ABSTRACT; } elseif ($this->auxiliary) { return Schema::OBJECTCLASS_TYPE_AUXILIARY; - } else { - return Schema::OBJECTCLASS_TYPE_UNKNOWN; } + + return Schema::OBJECTCLASS_TYPE_UNKNOWN; } /**