diff --git a/html/class_passwordRecovery.inc b/html/class_passwordRecovery.inc
index dfb38ba1690dacbb15e889465074a8c1cd78e710..b2e54a425d6ee782ae194662d9cdcbd294dbd829 100644
--- a/html/class_passwordRecovery.inc
+++ b/html/class_passwordRecovery.inc
@@ -387,7 +387,7 @@ class passwordRecovery extends standAlonePage {
     $this->loginAttribute = $config->get_cfg_value('passwordRecoveryLoginAttribute', 'uid');
 
     @DEBUG(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $config->get_cfg_value ('passwordRecoveryActivated'), "passwordRecoveryActivated");
-    return ($config->get_cfg_value('passwordRecoveryActivated') == "TRUE");
+    return($config->get_cfg_value('passwordRecoveryActivated') == "TRUE");
   }
 
   function storeToken ($temp_password)
@@ -404,7 +404,7 @@ class passwordRecovery extends standAlonePage {
     $ldap->cat($token, ['dn']);
     if (!$ldap->count()) {
       /* It's not, let's create it */
-      $ldap->cd ($config->current['BASE']);
+      $ldap->cd($config->current['BASE']);
       $ldap->create_missing_trees($token);
       if (!$ldap->success()) {
         return msgPool::ldaperror($ldap->get_error(),
diff --git a/include/class_Combinations.inc b/include/class_Combinations.inc
index 65027c70e8df4d852b58736a2f86495aa3834768..73baca00ec4a6f73485081265e1620986ae184c4 100644
--- a/include/class_Combinations.inc
+++ b/include/class_Combinations.inc
@@ -67,7 +67,7 @@ class Combinations implements Iterator
 
   function valid ()
   {
-    return ($this->pos >= 0);
+    return($this->pos >= 0);
   }
 
   protected function _next ()
diff --git a/include/class_IconTheme.inc b/include/class_IconTheme.inc
index 38f856e8d5d80bc6c33869889219c6b3a477fd63..7c5d56bb971e143890adec0e9f5955b1213301b0 100644
--- a/include/class_IconTheme.inc
+++ b/include/class_IconTheme.inc
@@ -70,7 +70,7 @@ class IconThemeDir
   {
     switch ($this->Type) {
       case 'Fixed':
-        return ($this->Size == $size);
+        return($this->Size == $size);
       default:
       case 'Threshold':
       case 'Scalable':
diff --git a/include/class_Language.inc b/include/class_Language.inc
index c4b20d1945a6b43a616c03d35ad310bdecaa9d2e..2e7c45f16fcd5b3bbffdf62471738941f73cbf53 100644
--- a/include/class_Language.inc
+++ b/include/class_Language.inc
@@ -42,7 +42,7 @@ class Language
       $lang = static::detect();
     }
 
-    list ($language, $country, $char) = parse_gettext_lang($lang);
+    list($language, $country, $char) = parse_gettext_lang($lang);
     putenv('LANGUAGE=');
     putenv("LANG=$lang");
     $langset = setlocale(LC_ALL, $lang, $language.'.'.$char);
@@ -226,7 +226,7 @@ class Language
 
   public static function setHeaders ($language, $mime)
   {
-    list ($lang, $country, $char) = parse_gettext_lang($language);
+    list($lang, $country, $char) = parse_gettext_lang($language);
 
     if (!headers_sent()) {
       header("Content-Language: $lang".(empty($country) ? '' : "-$country"));
diff --git a/include/class_SnapshotDialogs.inc b/include/class_SnapshotDialogs.inc
index 2538abcc5b7eddcd9340063e304badf8fd7b04c8..0f4bc0d9555c1316b4b599b78777d95b97db11a2 100644
--- a/include/class_SnapshotDialogs.inc
+++ b/include/class_SnapshotDialogs.inc
@@ -196,7 +196,7 @@ class SnapshotsAttribute extends OrderedArrayAttribute
   protected function genRowIcons ($key, $value)
   {
     $id = $this->getHtmlId();
-    list ($img, $nbicons) = parent::genRowIcons($key, $value);
+    list($img, $nbicons) = parent::genRowIcons($key, $value);
     $img = $this->renderInputField(
       'image', $id.'_restore_'.$key,
       [
diff --git a/include/class_SnapshotHandler.inc b/include/class_SnapshotHandler.inc
index a81e9f316133b2b39e25c46100a9edfdc3cda452..801612d71089ce48171706f08ad3243e25aacd6d 100644
--- a/include/class_SnapshotHandler.inc
+++ b/include/class_SnapshotHandler.inc
@@ -268,7 +268,7 @@ class SnapshotHandler
       $new_dn                           = 'gosaSnapshotTimestamp='.$target['gosaSnapshotTimestamp'].','.$new_base;
       $ldap->cat($new_dn);
       $usec++;
-    } while ($ldap->count());
+    } while($ldap->count());
 
     /* Insert this new snapshot */
     $ldap->cd($this->snapshotRDN);
diff --git a/include/class_acl.inc b/include/class_acl.inc
index abe7403400b317938a1ac6fc92d5c785b5e825ba..e327d51affb70f5558e3e37b7ae91567c60314da 100644
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
@@ -63,7 +63,7 @@ class acl
         if ($pa == $pb) {
           return 0;
         }
-        return ($pa < $pb ? -1 : 1);
+        return($pa < $pb ? -1 : 1);
       }
     );
 
diff --git a/include/class_baseSelector.inc b/include/class_baseSelector.inc
index 9aa823bf9746d9e9798023d06838699679227495..99f6aa621d526541b539924c35191ff013f62f68 100644
--- a/include/class_baseSelector.inc
+++ b/include/class_baseSelector.inc
@@ -241,7 +241,7 @@ class baseSelector
         }
         $this->tree .= "<ul>\n";
       } elseif ($indent < $last_indent) {
-        for ($i = 0; $i < ($last_indent - $indent); $i++) {
+        for($i = 0; $i < ($last_indent - $indent); $i++) {
           $this->tree .= "</li></ul>\n";
         }
         $this->tree .= "</li>\n";
diff --git a/include/class_config.inc b/include/class_config.inc
index cce36a10ba96dacd43d6867c9a1f8a0afac3543b..e6f06de7e60dd3434b31597339a9731eefd5c372 100644
--- a/include/class_config.inc
+++ b/include/class_config.inc
@@ -232,7 +232,7 @@ class config
 
       /* Load main parameters */
       case 'MAIN':
-        $this->data['MAIN'] = array_merge ($this->data['MAIN'], $attrs);
+        $this->data['MAIN'] = array_merge($this->data['MAIN'], $attrs);
         break;
 
       /* Ignore other tags */
@@ -539,8 +539,8 @@ class config
 
     /* Get list of department objects */
     $ldap = $this->get_ldap_link();
-    $ldap->cd ($this->current['BASE']);
-    $ldap->search ($filter, $ldap_values);
+    $ldap->cd($this->current['BASE']);
+    $ldap->search($filter, $ldap_values);
     while ($attrs = $ldap->fetch()) {
 
       /* Detect department type */
@@ -980,7 +980,7 @@ class config
           }
         }
       }
-      @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, join (',', array_unique ($acl)), "Class $class categories");
+      @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, join (',', array_unique($acl)), "Class $class categories");
       /* Feed menu */
       if (isset($plInfo['plSection'])) {
         $section = $plInfo['plSection'];
diff --git a/include/class_divSelectBox.inc b/include/class_divSelectBox.inc
index 1f54867f54f98816af1b4250b43d6d59c097708f..369e54e829d89193df5aa993b6be8315d215a621 100644
--- a/include/class_divSelectBox.inc
+++ b/include/class_divSelectBox.inc
@@ -167,7 +167,7 @@ class divSelectBox
       if ($this->headers !== FALSE) {
         $this->cols = count($this->headers);
         $str .= '<tr>';
-        for ($i = 0; $i < ($this->cols); $i++) {
+        for($i = 0; $i < ($this->cols); $i++) {
           if ($i >= ($this->cols - 1)) {
             $str .= '<td style="height:100%;border:0px;">&nbsp;</td>';
           } else {
@@ -220,7 +220,7 @@ class divSelectBox
       $s_return .= "\n</tr>";
     }
     $s_return .= "\n<tr>";
-    for ($i = 0; $i < ($this->cols); $i++) {
+    for($i = 0; $i < ($this->cols); $i++) {
       if ($i >= ($this->cols - 1)) {
         $s_return .= '<td style="height:100%;border:0px;"><div style="font-size:1px;">&nbsp;</div></td>';
       } else {
diff --git a/include/class_filter.inc b/include/class_filter.inc
index 7a9ab4474338b197c3b46d4c01f08740e2847eff..f8e515a14074cca4a595847de4eebba57c344f8d 100644
--- a/include/class_filter.inc
+++ b/include/class_filter.inc
@@ -333,7 +333,7 @@ class filter
     $c          = 0;
 
     /* Fill cells with charaters */
-    for ($i = 0, $l = mb_strlen($characters, 'UTF8'); $i < $l; $i++) {
+    for($i = 0, $l = mb_strlen($characters, 'UTF8'); $i < $l; $i++) {
       if ($c == 0) {
         $alphabet .= "<tr>";
       }
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 2f1809884b620deefd713a34968ac4c5dced05ca..4c90b6f7c551ff417b6881f3cec9005446e5626a 100644
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
@@ -544,7 +544,7 @@ class LDAP
       }
       $r = @ldap_delete($this->cid, $deletedn);
       $this->error = @ldap_error($this->cid);
-      return ($r ? $r : 0);
+      return($r ? $r : 0);
     } else {
       $this->error = "Could not connect to LDAP server";
       return "";
@@ -640,7 +640,7 @@ class LDAP
         }
       }
       $this->error = @ldap_error($this->cid);
-      return ($r ? $r : 0);
+      return($r ? $r : 0);
     } else {
       $this->error = "Could not connect to LDAP server";
       return "";
@@ -693,7 +693,7 @@ class LDAP
       if (!$this->success()) {
         $this->error .= $this->makeReadableErrors($this->error, $attrs);
       }
-      return ($r ? $r : 0);
+      return($r ? $r : 0);
     } else {
       $this->error = "Could not connect to LDAP server";
       return "";
@@ -716,7 +716,7 @@ class LDAP
       if (!$this->success()) {
         $this->error .= $this->makeReadableErrors($this->error, $attrs);
       }
-      return ($r ? $r : 0);
+      return($r ? $r : 0);
     } else {
       $this->error = "Could not connect to LDAP server";
       return "";
@@ -757,7 +757,7 @@ class LDAP
         }
       }
 
-      $this->cat ($srp, $cdn);
+      $this->cat($srp, $cdn);
       $attrs = $this->fetch($srp);
 
       /* Create missing entry? */
@@ -870,7 +870,7 @@ class LDAP
   function get_additional_error ()
   {
     $error = "";
-    @ldap_get_option ($this->cid, LDAP_OPT_ERROR_STRING, $error);
+    @ldap_get_option($this->cid, LDAP_OPT_ERROR_STRING, $error);
     return $error;
   }
 
@@ -924,7 +924,7 @@ class LDAP
   function hitSizeLimit ()
   {
     /* LDAP_SIZELIMIT_EXCEEDED 0x04 */
-    return ($this->get_errno() == 0x04);
+    return($this->get_errno() == 0x04);
   }
 
   function get_credentials ($url, $referrals = NULL)
@@ -1067,7 +1067,7 @@ class LDAP
             /* Ignore version number */
           } else {
             /* Line has ended */
-            list ($key, $value) = explode(':', $line, 2);
+            list($key, $value) = explode(':', $line, 2);
             $value = trim($value);
             if (preg_match('/^:/', $value)) {
               $value = base64_decode(trim(substr($value, 1)));
@@ -1235,7 +1235,7 @@ class LDAP
     /* Get list of objectclasses and fill array */
     $nb = $attr[0]['subschemasubentry'][0];
     $objectclasses = [];
-    $sr = ldap_read ($this->cid, $nb, 'objectClass=*', ['objectclasses']);
+    $sr = ldap_read($this->cid, $nb, 'objectClass=*', ['objectclasses']);
     $attrs = ldap_get_entries($this->cid, $sr);
     if (!isset($attrs[0])) {
       return [];
@@ -1359,15 +1359,15 @@ class LDAP
   function get_naming_contexts ($server, $admin = '', $password = '')
   {
     /* Build LDAP connection */
-    $ds = ldap_connect ($server);
+    $ds = ldap_connect($server);
     if (!$ds) {
       die ('Can\'t bind to LDAP. No check possible!');
     }
     ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
-    ldap_bind ($ds, $admin, $password);
+    ldap_bind($ds, $admin, $password);
 
     /* Get base to look for naming contexts */
-    $sr   = @ldap_read ($ds, '', 'objectClass=*', ['namingContexts']);
+    $sr   = @ldap_read($ds, '', 'objectClass=*', ['namingContexts']);
     $attr = @ldap_get_entries($ds, $sr);
 
     return $attr[0]['namingcontexts'];
diff --git a/include/class_listing.inc b/include/class_listing.inc
index 89de0ed9a8d5c3ef6ea76b6aff0fca68380edcf5..3f5d18384040d457dd9b148f48399b33782f8b33 100644
--- a/include/class_listing.inc
+++ b/include/class_listing.inc
@@ -1117,7 +1117,7 @@ class listing
     $params = [func_get_arg(2)];
 
     // Collect sprintf params
-    for ($i = 3;$i < func_num_args();$i++) {
+    for($i = 3;$i < func_num_args();$i++) {
       $val = func_get_arg($i);
       if (empty($val)) {
         continue;
diff --git a/include/class_msgPool.inc b/include/class_msgPool.inc
index afbedbcd9b716cecd16bb8e1e4c8d0ce3a76d865..d560ef3ccd65f1dd98d499f52f88f59cd7859c42 100644
--- a/include/class_msgPool.inc
+++ b/include/class_msgPool.inc
@@ -443,7 +443,7 @@ class msgPool {
       $mismatch = "";
 
       mb_internal_encoding('UTF-8');
-      for ($i = 0; $i <= mb_strlen($data); $i++) {
+      for($i = 0; $i <= mb_strlen($data); $i++) {
         $currentChar = mb_substr($data, $i, 1);
         if (preg_match("$regex", $currentChar)) {
           $result .= $currentChar;
diff --git a/include/class_pluglist.inc b/include/class_pluglist.inc
index 095728a3c193915f98c381c426f015b342f06d50..a725ea4d6f05a4b732ea6cc210f2c787d85522f6 100644
--- a/include/class_pluglist.inc
+++ b/include/class_pluglist.inc
@@ -352,7 +352,7 @@ class pluglist {
           if (isset($info['CLASS']) && plugin_available($info['CLASS'])) {
             $index  = $this->get_index($info['CLASS']);
             $this->allowed_plugins[$index] = $index;
-            list ($plHeadline, $plDescription, $href, ) = $this->get_infos($info['CLASS']);
+            list($plHeadline, $plDescription, $href, ) = $this->get_infos($info['CLASS']);
             $id             = $info['CLASS'];
           } elseif (!isset($info['CLASS'])) {
             $plHeadline     = $info['TITLE'];
@@ -416,7 +416,7 @@ class pluglist {
           }
           if (isset($info['CLASS']) && plugin_available($info['CLASS'])) {
             /* Read information from class variable */
-            list ($plHeadline, $plDescription, $href, $plIcon) = $this->get_infos($info['CLASS']);
+            list($plHeadline, $plDescription, $href, $plIcon) = $this->get_infos($info['CLASS']);
             $id             = $info['CLASS'];
           } elseif (!isset($info['CLASS'])) {
             $plHeadline     = $info['TITLE'];
diff --git a/include/class_templateHandling.inc b/include/class_templateHandling.inc
index 35795369a851fd92669be49c18ad47d790c76c4c..ef058d6740ad1d29338d44e9ee078846170669a0 100644
--- a/include/class_templateHandling.inc
+++ b/include/class_templateHandling.inc
@@ -503,7 +503,7 @@ class templateHandling
             );
             return [];
           }
-          $deps = static::flatDepends ($cache, $errors, $depends, $a, $forbidden);
+          $deps = static::flatDepends($cache, $errors, $depends, $a, $forbidden);
           if (($askmeKey = array_search('askme', $deps)) !== FALSE) {
             /* Do not flat special askme dependency */
             unset($deps[$askmeKey]);
@@ -527,7 +527,7 @@ class templateHandling
       if (!is_array($values))  {
         $values = [$values];
       }
-      unset ($values['count']);
+      unset($values['count']);
       foreach ($values as $value) {
         $offset = 0;
         while (preg_match('/%([^%\|]+\|)?([^%]+)%/', $value, $m, PREG_OFFSET_CAPTURE, $offset)) {
diff --git a/include/class_tests.inc b/include/class_tests.inc
index a943c932568ae119a334d80592962e9ce1c153d9..cd68bac8d5bdf2d6724a219a06fb54fb943ae674 100644
--- a/include/class_tests.inc
+++ b/include/class_tests.inc
@@ -325,7 +325,7 @@ class tests
 
       $ar2  = explode(".", $ip2);
       $var2 = $ar2[0] * (16777216) + $ar2[1] * (65536) + $ar2[2] * (256) + $ar2[3];
-      return ($var1 < $var2);
+      return($var1 < $var2);
     }
   }
 
@@ -356,7 +356,7 @@ class tests
     $curr   = $ad[0] * (16777216) + $ad[1] * (65536) + $ad[2] * (256) + $ad[3];
     $last   = $la[0] * (16777216) + $la[1] * (65536) + $la[2] * (256) + $la[3];
 
-    return ($first < $curr && $last > $curr);
+    return($first < $curr && $last > $curr);
   }
 
   /* \brief Check if the specified IP address $address is inside the given network */
@@ -371,7 +371,7 @@ class tests
     $to   = $to[0] * (16777216) + $to[1] * (65536) + $to[2] * (256) + $to[3];
     $ad   = $ad[0] * (16777216) + $ad[1] * (65536) + $ad[2] * (256) + $ad[3];
 
-    return ($ad >= $from && $ad <= $to);
+    return($ad >= $from && $ad <= $to);
   }
 }
 
diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc
index 99f836505087207bc287d52fe9cc6efcad8c2caf..51206f8b04d9b401e8e811e82712f1a80e04954b 100644
--- a/include/class_userinfo.inc
+++ b/include/class_userinfo.inc
@@ -332,7 +332,7 @@ class userinfo
   {
     $remove = (strpos($this->get_permissions($dn, $object.'/'.$class), 'd') !== FALSE);
     $read   = (strpos($this->get_complete_category_acls($dn, $object), 'r') !== FALSE);
-    return ($remove && $read);
+    return($remove && $read);
   }
 
 
@@ -835,7 +835,7 @@ class userinfo
           }
           $tmp = $this->get_permissions($dn, $category.'/'.$oc);
           $types = $acl;
-          for ($i = 0, $l = strlen($types); $i < $l; $i++) {
+          for($i = 0, $l = strlen($types); $i < $l; $i++) {
             if (strpos($tmp, $types[$i]) === FALSE) {
               $acl = str_replace($types[$i], '', $acl);
             }
@@ -994,7 +994,7 @@ class userinfo
     if (empty($this->ACLperPath)) {
       $this->loadACL();
     }
-    return ($this->get_permissions($config->current['BASE'], 'user/user') == 'rwcdm');
+    return($this->get_permissions($config->current['BASE'], 'user/user') == 'rwcdm');
   }
 
   /* \brief Test if a plugin is blacklisted for this user (does not show up in the menu)
@@ -1004,7 +1004,7 @@ class userinfo
     global $config;
     $blacklist = $config->get_cfg_value('PluginsMenuBlacklist', []);
     foreach ($blacklist as $item) {
-      list ($group, $p) = explode('|', $item, 2);
+      list($group, $p) = explode('|', $item, 2);
       if ($plugin == $p) {
         if (in_array($group, $this->groups) || in_array($group, $this->roles)) {
           return TRUE;
diff --git a/include/functions.inc b/include/functions.inc
index 03c198a8aac9f58a9dec9be5e917e90e92acdd16..cffa023ff3e64bb97c089050c27e59abe1cc231d 100644
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -415,7 +415,7 @@ function ldap_init ($server, $base, $binddn = '', $pass = '')
   }
 
   /* Preset connection base to $base and return to caller */
-  $ldap->cd ($base);
+  $ldap->cd($base);
   return $ldap;
 }
 
@@ -1017,7 +1017,7 @@ function strict_uid_mode ()
   global $config;
 
   if (isset($config)) {
-    return ($config->get_cfg_value('strictNamingRules') == 'TRUE');
+    return($config->get_cfg_value('strictNamingRules') == 'TRUE');
   }
   return TRUE;
 }
@@ -1381,7 +1381,7 @@ function gen_uids ($rule, $attributes)
   $stripped   = $rule;
   $variables  = [];
 
-  for ($pos = 0; preg_match('/%([^%]+)%/', $stripped, $m, PREG_OFFSET_CAPTURE, $pos); ) {
+  for($pos = 0; preg_match('/%([^%]+)%/', $stripped, $m, PREG_OFFSET_CAPTURE, $pos); ) {
     $variables[$pos]  = templateHandling::parseMask($m[1][0], $attributes);
     $replace          = '{'.$pos.'}';
     $stripped         = substr_replace($stripped, $replace, $m[0][1], strlen($m[0][0]));
@@ -1547,7 +1547,7 @@ function generate_alphabet ($count = 10)
   $c          = 0;
 
   /* Fill cells with charaters */
-  for ($i = 0, $l = mb_strlen($characters, 'UTF8'); $i < $l; $i++) {
+  for($i = 0, $l = mb_strlen($characters, 'UTF8'); $i < $l; $i++) {
     if ($c == 0) {
       $alphabet .= "<tr>";
     }
@@ -2336,13 +2336,13 @@ if (!function_exists ('ldap_escape')) {
         $charMaps[0][chr($i)] = sprintf('\\%02x', $i);
       }
 
-      for ($i = 0, $l = count($charMaps[LDAP_ESCAPE_FILTER]); $i < $l; $i++) {
+      for($i = 0, $l = count($charMaps[LDAP_ESCAPE_FILTER]); $i < $l; $i++) {
         $chr = $charMaps[LDAP_ESCAPE_FILTER][$i];
         unset($charMaps[LDAP_ESCAPE_FILTER][$i]);
         $charMaps[LDAP_ESCAPE_FILTER][$chr] = $charMaps[0][$chr];
       }
 
-      for ($i = 0, $l = count($charMaps[LDAP_ESCAPE_DN]); $i < $l; $i++) {
+      for($i = 0, $l = count($charMaps[LDAP_ESCAPE_DN]); $i < $l; $i++) {
         $chr = $charMaps[LDAP_ESCAPE_DN][$i];
         unset($charMaps[LDAP_ESCAPE_DN][$i]);
         $charMaps[LDAP_ESCAPE_DN][$chr] = $charMaps[0][$chr];
@@ -2364,7 +2364,7 @@ if (!function_exists ('ldap_escape')) {
 
     // Remove any chars to ignore from the list
     $ignore = (string)$ignore;
-    for ($i = 0, $l = strlen($ignore); $i < $l; $i++) {
+    for($i = 0, $l = strlen($ignore); $i < $l; $i++) {
       unset($charMap[$ignore[$i]]);
     }
 
@@ -2412,7 +2412,7 @@ if (!function_exists ('random_int')) {
       $rnd = hexdec(bin2hex($randomBytes));
       // discard irrelevant bits
       $rnd = $rnd & $filter;
-    } while ($rnd > $range);
+    } while($rnd > $range);
     return $min + $rnd;
   }
 }
diff --git a/include/functions_debug.inc b/include/functions_debug.inc
index d74650c2f007b3a9dadb694f3b8fe1aac1e778a4..f96bccd4449377f552f686ba21c6b34e0c9d1dbe 100644
--- a/include/functions_debug.inc
+++ b/include/functions_debug.inc
@@ -225,7 +225,7 @@ function print_a ($array, $return_mode = FALSE, $show_object_vars = FALSE, $expo
     $output = '<span style="color:red;font-size:small;">print_a( '.gettype( $array ).' )</span>';
   }
 
-  error_reporting ($e);
+  error_reporting($e);
   if ($return_mode) {
     return $output;
   } else {
diff --git a/include/password-methods/class_password-methods-sasl.inc b/include/password-methods/class_password-methods-sasl.inc
index 2a618a64bfd7dff8ee3b9d52798c505a90366e13..a6255054b92606819dfe9237e5c5e41f097213c5 100644
--- a/include/password-methods/class_password-methods-sasl.inc
+++ b/include/password-methods/class_password-methods-sasl.inc
@@ -120,7 +120,7 @@ class passwordMethodsasl extends passwordMethod
   function need_password ()
   {
     global $config;
-    return ($config->get_cfg_value('forceSaslPasswordAsk', 'FALSE') == 'TRUE');
+    return($config->get_cfg_value('forceSaslPasswordAsk', 'FALSE') == 'TRUE');
   }
 }
 ?>
diff --git a/include/password-methods/class_password-methods-smd5.inc b/include/password-methods/class_password-methods-smd5.inc
index d5b0a8cef437b3a1f2f4568ed5ac25282c81a93a..c52a7b5b2a297f22d796f06827e3b8a962039ff1 100644
--- a/include/password-methods/class_password-methods-smd5.inc
+++ b/include/password-methods/class_password-methods-smd5.inc
@@ -67,7 +67,7 @@ class passwordMethodsmd5 extends passwordMethod
     $salt = substr($hash, 16);
     $hash = substr($hash, 0, 16);
     $nhash = pack('H*', md5($pwd . $salt));
-    return ($nhash == $hash);
+    return($nhash == $hash);
   }
 
   /*!
diff --git a/include/password-methods/class_password-methods-ssha.inc b/include/password-methods/class_password-methods-ssha.inc
index 820efd749a07afaaad78058c8b6be4b920ae3575..78e38d4dc08c110f26a314b242fca845c96f9424 100644
--- a/include/password-methods/class_password-methods-ssha.inc
+++ b/include/password-methods/class_password-methods-ssha.inc
@@ -83,7 +83,7 @@ class passwordMethodssha extends passwordMethod
       msg_dialog::display(_('Configuration error'), msgPool::missingext('mhash'), ERROR_DIALOG);
       return FALSE;
     }
-    return ($nhash == $hash);
+    return($nhash == $hash);
   }
 
   /*!
diff --git a/include/password-methods/class_password-methods.inc b/include/password-methods/class_password-methods.inc
index 6a0929ff90ad2237fa7f95953fbc5f6d1333f34e..b789d5f7c30045dc6495a67585c5da85684932a4 100644
--- a/include/password-methods/class_password-methods.inc
+++ b/include/password-methods/class_password-methods.inc
@@ -261,7 +261,7 @@ class passwordMethod
    */
   function checkPassword ($pwd, $hash)
   {
-    return ($hash == $this->generate_hash($pwd));
+    return($hash == $this->generate_hash($pwd));
   }
 
 
@@ -380,7 +380,7 @@ class passwordMethod
     global $config;
     if ($config->get_cfg_value("strictPasswordRules") == "TRUE") {
       // Do we have UTF8 characters in the password?
-      return ($password == utf8_decode($password));
+      return($password == utf8_decode($password));
     }
 
     return TRUE;
diff --git a/include/php_setup.inc b/include/php_setup.inc
index 668d9b505ab6811c186b2e6e0a4bd81649d7ae9d..19f236880ac3cc8ca3346128ee2d6180adcc1622 100644
--- a/include/php_setup.inc
+++ b/include/php_setup.inc
@@ -70,7 +70,7 @@ function html_trace ($errstr = "")
                     '</td></tr>';
   $return_mailto  = rawurlencode('=== Trace ===');
   /* Generate trace history */
-  for ($index = 1, $c = count($trace); $index < $c; $index++) {
+  for($index = 1, $c = count($trace); $index < $c; $index++) {
     $ct   = $trace[$index];
     $loc  = '';
     $func = '';
@@ -207,7 +207,7 @@ function gosaRaiseError ($errno, $errstr, $errfile, $errline)
 
     /* Write to syslog */
     if (class_exists('logging') && !preg_match('/No such object/', $errstr)) {
-      logging::log('view', 'error', '', [], "PHP error: $errstr ($errfile, line $errline)");
+      logging::log('view', 'error', '', [], "PHP error: $errstr($errfile, line $errline)");
     }
 
     set_error_handler('gosaRaiseError', E_WARNING | E_NOTICE | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT);
@@ -266,7 +266,7 @@ function gosaRaiseError ($errno, $errstr, $errfile, $errline)
 
   /* Create error header */
   $error_collector_mailto .= rawurlencode("=== Error === \n");
-  $error_collector_mailto .= rawurlencode("PHP error: $errstr ($errfile, line $errline)\n");
+  $error_collector_mailto .= rawurlencode("PHP error: $errstr($errfile, line $errline)\n");
   $error_collector_mailto .= rawurlencode("=== /Error === \n\n");
 
   list($html_trace, $mailto_trace) = html_trace($errstr);
diff --git a/include/simpleplugin/attributes/class_BooleanAttribute.inc b/include/simpleplugin/attributes/class_BooleanAttribute.inc
index 8795e6696d4fec5f5183e87fb4ba238b22aed001..0ab90d99c619d62f3bef374e6ff5b6e96df5d27d 100644
--- a/include/simpleplugin/attributes/class_BooleanAttribute.inc
+++ b/include/simpleplugin/attributes/class_BooleanAttribute.inc
@@ -61,7 +61,7 @@ class BooleanAttribute extends Attribute
     if ($this->isTemplate() && $this->isTemplatable() && ($value === '%askme%')) {
       return $value;
     }
-    return ($value == $this->trueValue);
+    return($value == $this->trueValue);
   }
 
   function loadPostValue ()
@@ -86,7 +86,7 @@ class BooleanAttribute extends Attribute
     if ($this->isTemplate() && $this->isTemplatable() && ($this->value === '%askme%')) {
       return $this->value;
     } else {
-      return ($this->value ? $this->trueValue : $this->falseValue);
+      return($this->value ? $this->trueValue : $this->falseValue);
     }
   }
 
diff --git a/include/simpleplugin/attributes/class_SetAttribute.inc b/include/simpleplugin/attributes/class_SetAttribute.inc
index 07698b24c5c89eb94b1ac93fd2b2eb8327671f85..15ce67e3507bb368483841178b8cea156ea35557 100644
--- a/include/simpleplugin/attributes/class_SetAttribute.inc
+++ b/include/simpleplugin/attributes/class_SetAttribute.inc
@@ -453,7 +453,7 @@ class OrderedArrayAttribute extends SetAttribute
         continue;
       }
 
-      list ($img, $nbicons) = $this->genRowIcons($key, $value);
+      list($img, $nbicons) = $this->genRowIcons($key, $value);
 
       $fields[] = ["html" => $img, "attach" => 'style="border:0px;width:'.($nbicons * 20).'px;"'];
       $div->AddEntry($fields);
diff --git a/include/simpleplugin/class_Attribute.inc b/include/simpleplugin/class_Attribute.inc
index f9d9565cc823b3c6254f08272b7ec01bb7c98e53..37da6f5911f7375a47017a6103958b97bddf3d3a 100644
--- a/include/simpleplugin/class_Attribute.inc
+++ b/include/simpleplugin/class_Attribute.inc
@@ -321,7 +321,7 @@ class Attribute
 
   function hasChanged ()
   {
-    return ($this->getValue() !== $this->initialValue);
+    return($this->getValue() !== $this->initialValue);
   }
 
   function displayValue ($value)
@@ -363,7 +363,7 @@ class Attribute
     if (isset($this->managedAttributesMultipleValues[$mavalue])) {
       return in_array($myvalue, $this->managedAttributesMultipleValues[$mavalue]);
     } else {
-      return ($myvalue == $mavalue);
+      return($myvalue == $mavalue);
     }
   }
 
@@ -520,7 +520,7 @@ class Attribute
         ),
         function ($ou)
         {
-          return ($ou !== FALSE);
+          return($ou !== FALSE);
         }
       );
       while ($attrs = $ldap->fetch()) {
@@ -725,7 +725,7 @@ class Attribute
 
   function foreignKeyCheck ($value, $source)
   {
-    return ($this->getValue() == $value);
+    return($this->getValue() == $value);
   }
 
   protected function renderInputField ($type, $name, $attributes = [])
@@ -878,7 +878,7 @@ class DisplayAttribute extends DisplayLDAPAttribute
 {
   function __construct ($label, $description, $ldapName, $required = FALSE, $defaultValue = "", $acl = "")
   {
-    parent::__construct ($label, $description, $ldapName, $required, $defaultValue, $acl);
+    parent::__construct($label, $description, $ldapName, $required, $defaultValue, $acl);
     $this->setInLdap(FALSE);
   }
 }
@@ -891,7 +891,7 @@ class ObjectLinkAttribute extends DisplayLDAPAttribute
 
   function __construct ($label, $description, $ldapName, $required, $type, $defaultValue = "", $acl = "")
   {
-    parent::__construct ($label, $description, $ldapName, $required, $defaultValue, $acl);
+    parent::__construct($label, $description, $ldapName, $required, $defaultValue, $acl);
     $this->type = $type;
   }
 
diff --git a/include/simpleplugin/class_dialogAttributes.inc b/include/simpleplugin/class_dialogAttributes.inc
index 8e11a2774f310f2abd6129b4f95886251bfc33a2..dac4b7482aad39fbd2128898610ddc42e75baa2e 100644
--- a/include/simpleplugin/class_dialogAttributes.inc
+++ b/include/simpleplugin/class_dialogAttributes.inc
@@ -548,7 +548,7 @@ class GroupsAttribute extends GenericDialogAttribute
 
   function __construct ($label, $description, $ldapName, $required = FALSE, $defaultValue = [], $acl = '')
   {
-    parent::__construct ($label, $description, $ldapName, $required, $defaultValue, 'dn', 'cn', $acl);
+    parent::__construct($label, $description, $ldapName, $required, $defaultValue, 'dn', 'cn', $acl);
   }
 
   function addValue ($dn, $entry)
diff --git a/include/simpleplugin/class_helpersAttribute.inc b/include/simpleplugin/class_helpersAttribute.inc
index f0553df615a416e8b85ec2a26a7b66df0b72f159..422eb62ef5f961a819646a0a3a9a49f95fcf5f88 100644
--- a/include/simpleplugin/class_helpersAttribute.inc
+++ b/include/simpleplugin/class_helpersAttribute.inc
@@ -271,7 +271,7 @@ class BytesSizeAttribute extends UnitIntAttribute
       pow(1024, 3)  => _('GiB'),
       pow(1024, 4)  => _('TiB'),
     ];
-    parent::__construct ($label, $description, $ldapName, $required, $units, $min, $max, $defaultValue, $acl);
+    parent::__construct($label, $description, $ldapName, $required, $units, $min, $max, $defaultValue, $acl);
   }
 }
 
@@ -288,7 +288,7 @@ class TimeAttribute extends UnitIntAttribute
       3600  => _('hours'),
       86400 => _('days'),
     ];
-    parent::__construct ($label, $description, $ldapName, $required, $units, $min, $max, $defaultValue, $acl);
+    parent::__construct($label, $description, $ldapName, $required, $units, $min, $max, $defaultValue, $acl);
   }
 }
 
diff --git a/include/simpleplugin/class_simpleManagement.inc b/include/simpleplugin/class_simpleManagement.inc
index 67acc110da7fe9a8bf66aa19bdca408401369da9..df03add14bf2a895bc3b7064d6521878b6df4fd0 100644
--- a/include/simpleplugin/class_simpleManagement.inc
+++ b/include/simpleplugin/class_simpleManagement.inc
@@ -745,7 +745,7 @@ class simpleManagement
     }
 
     // Add locks
-    add_lock ($this->dns, $ui->dn);
+    add_lock($this->dns, $ui->dn);
 
     $this->dn           = array_shift($this->dns);
     $this->dialogObject = new templateDialog($this, $type, NULL, $this->dn);
@@ -889,7 +889,7 @@ class simpleManagement
       if ($locks = get_locks($this->dn, TRUE)) {
         return gen_locked_message($locks, $this->dn, TRUE);
       }
-      add_lock ($this->dn, $ui->dn);
+      add_lock($this->dn, $ui->dn);
 
       // Open object
       $this->openTabObject(objects::open($this->dn, $type), $this->dn);
@@ -1069,7 +1069,7 @@ class simpleManagement
           'type'  => $info['name']
         ];
       }
-      add_lock ($this->dns, $ui->dn);
+      add_lock($this->dns, $ui->dn);
 
       // Display confirmation dialog.
       $smarty = get_smarty();
diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc
index 9735c22d809a84dbec8878bf69d2affb261df766..f3c7e9c8d080e151b31f926d23b2cd9c0af15668 100644
--- a/include/simpleplugin/class_simplePlugin.inc
+++ b/include/simpleplugin/class_simplePlugin.inc
@@ -902,7 +902,7 @@ class simplePlugin
 
   protected function acl_skip_write ()
   {
-    return ($this->needEditMode && !session::is_set('edit'));
+    return($this->needEditMode && !session::is_set('edit'));
   }
 
   /*! \brief Can we write the attribute */
@@ -1095,7 +1095,7 @@ class simplePlugin
             $attr->loadPostValue();
           }
         }
-        unset ($attrs);
+        unset($attrs);
       }
       unset($sectionInfo);
       // A second one that applies them. That allow complex stuff such as attribute disabling
@@ -1106,7 +1106,7 @@ class simplePlugin
             $attr->applyPostValue();
           }
         }
-        unset ($attrs);
+        unset($attrs);
       }
       unset($sectionInfo);
     }
@@ -1163,7 +1163,7 @@ class simplePlugin
       if (is_array($this->attrs[$index]) &&
           (count($this->attrs[$index]) == 0) &&
           !isset($this->saved_attributes[$index])) {
-        unset ($this->attrs[$index]);
+        unset($this->attrs[$index]);
         continue;
       }
 
@@ -1172,7 +1172,7 @@ class simplePlugin
           isset($this->saved_attributes[$index]) &&
           !is_array($this->saved_attributes[$index]) &&
           ($this->attrs[$index] == $this->saved_attributes[$index])) {
-        unset ($this->attrs[$index]);
+        unset($this->attrs[$index]);
         continue;
       }
 
@@ -1181,7 +1181,7 @@ class simplePlugin
           isset($this->saved_attributes[$index]) &&
           is_array($this->saved_attributes[$index])) {
         if (!array_differs($this->attrs[$index], $this->saved_attributes[$index])) {
-          unset ($this->attrs[$index]);
+          unset($this->attrs[$index]);
           continue;
         }
       }
@@ -1837,7 +1837,7 @@ class simplePlugin
         $usableAttributes[] = (string)$attr;
       }
     }
-    for ($i = 1; $i < count($usableAttributes); $i++) {
+    for($i = 1; $i < count($usableAttributes); $i++) {
       foreach (new Combinations($usableAttributes, $i) as $attrs) {
         $dn = $attribute.'='.ldap_escape_dn($this->$attribute);
         foreach ($attrs as $attr) {
diff --git a/plugins/addons/dashboard/class_dashBoard.inc b/plugins/addons/dashboard/class_dashBoard.inc
index 57cd0f47dbace4624c179be35a6c72122775ade7..076c9ab934955642d7560ebd3138d1635f82f2b9 100644
--- a/plugins/addons/dashboard/class_dashBoard.inc
+++ b/plugins/addons/dashboard/class_dashBoard.inc
@@ -109,7 +109,7 @@ class dashboard extends simplePlugin
     usort($stats,
       function ($a, $b)
       {
-        return ($b['priority'] < $a['priority']);
+        return($b['priority'] < $a['priority']);
       }
     );
 
diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc
index 6b5b5a11a33d25f26809a7648febdfa4dc9ca9e7..3fca279f6d2b593f682a2044541f0c483e962e7c 100644
--- a/plugins/admin/acl/class_aclManagement.inc
+++ b/plugins/admin/acl/class_aclManagement.inc
@@ -207,7 +207,7 @@ class aclManagement extends simpleManagement
     if ($dn == $base) {
       $ou = ' . ';
     } else {
-      for ($i = 4;$i < func_num_args();$i++) {
+      for($i = 4;$i < func_num_args();$i++) {
         $val = func_get_arg($i);
         if (empty($val)) {
           continue;
diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index 0464078babf87d5ff46ae0215d3308fb3c7568b5..1ae261449f5efde2b23ac04246ea9750de0ba611 100644
--- a/plugins/admin/groups/class_groupManagement.inc
+++ b/plugins/admin/groups/class_groupManagement.inc
@@ -301,7 +301,7 @@ class groupManagement extends simpleManagement
   {
     $types  = preg_replace('/[^a-z]/i', '', $gosaGroupObjects[0]);
     $result = '';
-    for ($i = 0; $i < strlen($types); $i++) {
+    for($i = 0; $i < strlen($types); $i++) {
       if ($types[$i] == 'I') {
         continue;
       }
diff --git a/plugins/admin/groups/tabs_ogroups.inc b/plugins/admin/groups/tabs_ogroups.inc
index 55bec8e42b28b784c0ad29a65ccc0ba1ec0f08a4..406631973d323ee51587a7dc7632341dbea30f57 100644
--- a/plugins/admin/groups/tabs_ogroups.inc
+++ b/plugins/admin/groups/tabs_ogroups.inc
@@ -47,7 +47,7 @@ class ogrouptabs extends simpleTabs_noSpecial
         $dtabs  = [];
       }
       $tabs   = FALSE;
-      for ($i = 0; $i < strlen($objects); $i++) {
+      for($i = 0; $i < strlen($objects); $i++) {
         if (in_array($objects[$i], ['I','G'])) {
           /* Ignore unknown objects and groups */
           continue;
diff --git a/plugins/config/class_configInLdap.inc b/plugins/config/class_configInLdap.inc
index a309d0f17fd33f7e280c9451685d953c774357ef..82235eea9727b7bcbe9952198a5ab826fbefc8e6 100644
--- a/plugins/config/class_configInLdap.inc
+++ b/plugins/config/class_configInLdap.inc
@@ -490,7 +490,7 @@ class configInLdap extends simplePlugin
     foreach ($config->data['SECTIONS'] as $section => $section_infos) {
       foreach ($config->data['MENU'][$section] as $info) {
         if (isset($info['CLASS'])) {
-          list ($plHeadline, , , ) = $plist->get_infos($info['CLASS']);
+          list($plHeadline, , , ) = $plist->get_infos($info['CLASS']);
           $menuPlugins[$info['CLASS']] = $plHeadline;
         }
       }