diff --git a/lib/elearning/Ilias3ConnectedPermissions.class.php b/lib/elearning/Ilias3ConnectedPermissions.class.php
index 9bf2fcd6d41409ae9e83c0291101a9c2842e7931..5ac5f59c24c2d2ba6f8880c6740f670b9218a2cf 100644
--- a/lib/elearning/Ilias3ConnectedPermissions.class.php
+++ b/lib/elearning/Ilias3ConnectedPermissions.class.php
@@ -111,8 +111,6 @@ class Ilias3ConnectedPermissions extends ConnectedPermissions
                     }
                 }
             }
-//             if ($GLOBALS["debug"] == true)
-//                 echo "P$proper_role A$active_role U" . $user_crs_role . " R" . implode($connected_cms[$this->cms_type]->user->getRoles(), ".")."<br>";
         }
 
         // is user already course-member? otherwise add member with proper role
@@ -205,9 +203,9 @@ class Ilias3ConnectedPermissions extends ConnectedPermissions
                     $module_id,
                     $connected_cms[$this->cms_type]->user->getId()
                     );
-//      echo "MID".$module_id."UID".$connected_cms[$this->cms_type]->user->getId()."OPS".implode($this->tree_allowed_operations,"-") ;
-        if (! is_array($this->tree_allowed_operations))
+        if (!is_array($this->tree_allowed_operations)) {
             return false;
+        }
 
         $no_permission = false;
         if (isset($current_module)) { //TODO: fixes Warning:Creating default object from empty value - possible side effects
diff --git a/lib/elearning/Ilias3ContentModule.class.php b/lib/elearning/Ilias3ContentModule.class.php
index 63857bfc94d34978a9c7cea4fe8d058e404b8772..3067575779bf970a73485edeeef82c726bac95fe 100644
--- a/lib/elearning/Ilias3ContentModule.class.php
+++ b/lib/elearning/Ilias3ContentModule.class.php
@@ -62,7 +62,6 @@ class Ilias3ContentModule extends ContentModule
                 $user_name = trim($user_data["title"] . " " . $user_data["firstname"] . " " . $user_data["lastname"]);
                 $this->setAuthors($user_name);
             }
-//          echo $object_data["accessInfo"] . ": " . implode($object_data["operations"], ".");
             $this->setPermissions($object_data["accessInfo"], $object_data["operations"]);
         }
         else
diff --git a/lib/elearning/Ilias3Soap.class.php b/lib/elearning/Ilias3Soap.class.php
index 6a43b9bb611d846a28e0e70665c7f00881efcb9c..4fc5a65f3d51111cd5b9851d93b2bf735a7882d1 100644
--- a/lib/elearning/Ilias3Soap.class.php
+++ b/lib/elearning/Ilias3Soap.class.php
@@ -93,7 +93,7 @@ class Ilias3Soap extends StudipSoapClient
     */
     function call($method, $params)
     {
-        $index = md5($method . ":" . implode($params, "-"));
+        $index = md5($method . ":" . implode('-', $params));
         // return false if no session_id is given
         if (($method != "login") AND ($params["sid"] == ""))
             return false;
@@ -597,9 +597,9 @@ class Ilias3Soap extends StudipSoapClient
         {
             $objects = $this->parseXML($result);
             $roles = [];
-            foreach ($objects as $count => $role)
+            foreach ($objects as $count => $role) {
                 $roles[$count] = $role["obj_id"];
-//          echo implode($roles, ".");
+            }
             return $roles;
         }
         return false;
diff --git a/lib/elearning/Ilias4Soap.class.php b/lib/elearning/Ilias4Soap.class.php
index 91723386fb037217b30a9cbd33601603bb40ba17..27c28fb0f53ee830f1104ffc666d92ba8284242e 100644
--- a/lib/elearning/Ilias4Soap.class.php
+++ b/lib/elearning/Ilias4Soap.class.php
@@ -141,7 +141,7 @@ class Ilias4Soap extends Ilias3Soap
         }
 
         if (is_array($path)) {
-            return implode($path, $this->separator_string);
+            return implode($this->separator_string, $path);
         } else {
             return false;
         }
@@ -173,7 +173,7 @@ class Ilias4Soap extends Ilias3Soap
         }
 
         if (is_array($path)) {
-            return implode($path, '_');
+            return implode('_', $path);
         } else {
             return false;
         }
diff --git a/lib/elearning/Ilias5Soap.class.php b/lib/elearning/Ilias5Soap.class.php
index 80c683d111b590d4f8662a910656aa149877b80b..cf8bd4c4e5b180e9a474eeb6819cfe062a1b0263 100644
--- a/lib/elearning/Ilias5Soap.class.php
+++ b/lib/elearning/Ilias5Soap.class.php
@@ -30,7 +30,7 @@ class Ilias5Soap extends Ilias4Soap
      */
     function call($method, $params)
     {
-        $index = md5($method . ":" . implode($params, "-"));
+        $index = md5($method . ":" . implode('-', $params));
         // return false if no session_id is given
         if (($method != "login") AND ($params["sid"] == ""))
             return false;
@@ -111,4 +111,4 @@ class Ilias5Soap extends Ilias4Soap
         $result = $this->call('login', $param);
         return $result;
     }
-}
\ No newline at end of file
+}
diff --git a/lib/ilias_interface/IliasSoap.class.php b/lib/ilias_interface/IliasSoap.class.php
index 231b8e90f33c98d18304bcaeff6e2a4e3b7536b5..e140a9f570583fd6c58fdd84f17721db2169532d 100644
--- a/lib/ilias_interface/IliasSoap.class.php
+++ b/lib/ilias_interface/IliasSoap.class.php
@@ -111,7 +111,7 @@ class IliasSoap extends StudipSoapClient
             return false;
         }
 
-        $cache_index = md5($method . ':' . implode($params, '-'));
+        $cache_index = md5($method . ':' . implode('-', $params));
         if ($this->caching_active && isset($this->soap_cache[$cache_index]) && $method !== 'login') {
             $result = $this->soap_cache[$cache_index];
         } else {
@@ -1128,7 +1128,7 @@ class IliasSoap extends StudipSoapClient
         }
 
         if (is_array($path)) {
-            return implode($path, $this->separator_string);
+            return implode($this->separator_string, $path);
         } else {
             return false;
         }
@@ -1160,7 +1160,7 @@ class IliasSoap extends StudipSoapClient
         }
 
         if (is_array($path)) {
-            return implode($path, '_');
+            return implode('_', $path);
         } else {
             return false;
         }
diff --git a/lib/models/MvvFileFileref.php b/lib/models/MvvFileFileref.php
index 13be9e15415fcf855b126988c1f2e8d0087157ca..0771055936e5f7f4ec460b48fa51f7f0c4c12839 100644
--- a/lib/models/MvvFileFileref.php
+++ b/lib/models/MvvFileFileref.php
@@ -83,7 +83,7 @@ class MvvFileFileref extends ModuleManagementModel
                 list($category, $type) = explode('/', $mime_type, 2);
                 if ($category == 'application') {
                     foreach ($application_category as $name => $type_name) {
-                        if (preg_match('/' . implode($type_name, '|') . '/i', $type)) {
+                        if (preg_match('/' . implode('|', $type_name) . '/i', $type)) {
                             return $name;
                         }
                     }
diff --git a/lib/soap/StudipSoapClient.class.php b/lib/soap/StudipSoapClient.class.php
index 01b13928fa1d21e5d8f5446d68e42d3fe1e6adc7..f6c0cadcbb07d7c76dbe7caed587ec839859d8de 100644
--- a/lib/soap/StudipSoapClient.class.php
+++ b/lib/soap/StudipSoapClient.class.php
@@ -32,15 +32,14 @@ class StudipSoapClient
         {
             $this->faultstring = $result["faultstring"];
             if (!in_array(mb_strtolower($this->faultstring), ["session not valid","session invalid", "session idled"]))
-                $this->error .= "<b>" . sprintf(_("SOAP-Fehler, Funktion \"%s\":"), $method) . "</b> " . $result["faultstring"] . " (" . $result["faultcode"] . ")<br>"; //.implode($params,"-");
-        }
-        else
-        {
+                $this->error .= "<b>" . sprintf(_("SOAP-Fehler, Funktion \"%s\":"), $method) . "</b> " . $result["faultstring"] . " (" . $result["faultcode"] . ")<br>";
+        } else {
             $err = $this->soap_client->getError();
-            if ($err)
-                $this->error .= "<b>" . sprintf(_("SOAP-Fehler, Funktion \"%s\":"), $method) . "</b> " . $err . "<br>"; //.implode($params,"-") . htmlspecialchars($this->soap_client->response, ENT_QUOTES);
-            else
+            if ($err) {
+                $this->error .= "<b>" . sprintf(_("SOAP-Fehler, Funktion \"%s\":"), $method) . "</b> " . $err . "<br>";
+            } else {
                 return $result;
+            }
         }
         error_log($this->error);
         return false;