diff --git a/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php b/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php
index a1062376d98df4ba15fcce8c74d0b4ccb005a5a7..99ca6c0cc91a26407d977180a979f85ee54bc0e7 100644
--- a/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php
+++ b/modules/ldap/lib/Auth/Process/AttributeAddFromLDAP.php
@@ -34,7 +34,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process;
  * @author Remy Blom <remy.blom@hku.nl>
  * @package SimpleSAMLphp
  */
-
 class AttributeAddFromLDAP extends BaseFilter
 {
     /**
@@ -60,6 +59,7 @@ class AttributeAddFromLDAP extends BaseFilter
      */
     protected $attr_policy;
 
+
     /**
      * Initialize this filter.
      *
@@ -136,6 +136,7 @@ class AttributeAddFromLDAP extends BaseFilter
      * Add attributes from an LDAP server.
      *
      * @param array &$request The current request
+     * @return void
      */
     public function process(&$request)
     {
diff --git a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php
index fc66ec57f5f8bc6307b550563ead6ec4d72edf70..ccf94067aad2bf2014a3f43ea0dee2cf027aec8c 100644
--- a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php
+++ b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php
@@ -10,7 +10,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process;
  * @author Ryan Panning <panman@traileyes.com>
  * @package SimpleSAMLphp
  */
-
 class AttributeAddUsersGroups extends BaseFilter
 {
     /**
@@ -21,6 +20,7 @@ class AttributeAddUsersGroups extends BaseFilter
      *
      * @throws \SimpleSAML\Error\Exception
      * @param $request
+     * @return void
      */
     public function process(&$request)
     {
diff --git a/modules/ldap/lib/Auth/Process/BaseFilter.php b/modules/ldap/lib/Auth/Process/BaseFilter.php
index f7de0656fc8da7e7b090737fc0e2f5d8ec5fb916..4c1d9d002aadb87182e69899e9983c85cd0dbc46 100644
--- a/modules/ldap/lib/Auth/Process/BaseFilter.php
+++ b/modules/ldap/lib/Auth/Process/BaseFilter.php
@@ -14,7 +14,6 @@ namespace SimpleSAML\Module\ldap\Auth\Process;
  * @author Remy Blom <remy.blom@hku.nl>
  * @package SimpleSAMLphp
  */
-
 abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
 {
     /**
@@ -50,7 +49,7 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
      * Instance, object of the ldap connection. Stored here to
      * be access later during processing.
      *
-     * @var \SimpleSAML\Auth\Ldap
+     * @var \SimpleSAML\Auth\LDAP
      */
     private $ldap;
 
@@ -90,8 +89,8 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
      * instance/object and stores everything in class members.
      *
      * @throws \SimpleSAML\Error\Exception
-     * @param array $config
-     * @param $reserved
+     * @param array &$config
+     * @param mixed $reserved
      */
     public function __construct(&$config, $reserved)
     {
@@ -255,12 +254,12 @@ abstract class BaseFilter extends \SimpleSAML\Auth\ProcessingFilter
      * rather than setting in the constructor to avoid unnecessarily
      * connecting to LDAP when it might not be needed.
      *
-     * @return \SimpleSAML\Auth\Ldap
+     * @return \SimpleSAML\Auth\LDAP
      */
     protected function getLdap()
     {
         // Check if already connected
-        if ($this->ldap) {
+        if (isset($this->ldap)) {
             return $this->ldap;
         }
 
diff --git a/modules/ldap/lib/ConfigHelper.php b/modules/ldap/lib/ConfigHelper.php
index d4dcff33ad5084d1f8fdd08cca9bc1734cff91bf..6d862c5a0af14256ba8bdd6aca9fbd92aac47652 100644
--- a/modules/ldap/lib/ConfigHelper.php
+++ b/modules/ldap/lib/ConfigHelper.php
@@ -253,7 +253,7 @@ class ConfigHelper
      * @param bool $allowZeroHits
      * Determines if the method will throw an exception if no
      * hits are found. Defaults to FALSE.
-     * @return string
+     * @return string|null
      * The DN of the matching element, if found. If no element was
      * found and $allowZeroHits is set to FALSE, an exception will
      * be thrown; otherwise NULL will be returned.
@@ -295,6 +295,13 @@ class ConfigHelper
         );
     }
 
+
+    /**
+     * @param string $dn
+     * @param array|null $attributes
+     * @return array
+     * @throws \Exception
+     */
     public function getAttributes($dn, $attributes = null)
     {
         if ($attributes == null) {