Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Feb 12, 2021
1 parent 6dae596 commit 3456266
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions extensions/ki_adminpanel/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,11 @@ function getCustomersData(Kimai_Database_Mysql $database, $kgaUser, $viewOtherGr
*/
function getUsersData(Kimai_Database_Mysql $database, $kgaUser, $viewOtherGroupsAllowed)
{
$result = [
return [
'showDeletedUsers' => get_cookie('adminPanel_extension_show_deleted_users', 0),
'curr_user' => $kgaUser['name'],
'users' => getEditUserList($database, $kgaUser, $viewOtherGroupsAllowed)
];
return $result;
}

/**
Expand Down
5 changes: 2 additions & 3 deletions libraries/Kimai/Auth/Ldapadvanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
*/
class Kimai_Auth_Ldapadvanced extends Kimai_Auth_Abstract
{

/**
* Your LDAP-Server URI
*
Expand Down Expand Up @@ -424,8 +423,8 @@ public function getDefaultGlobalRole()
public function getDefaultGroups()
{
$groups = [];
$roles = [];
$map = [];
$roles = [];
$map = [];

$database = $this->getDatabase();
foreach ($database->membership_roles() as $role) {
Expand Down
13 changes: 9 additions & 4 deletions libraries/Kimai/Extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ public function loadConfigurations()
}

while (false !== ($dir = readdir($handle))) {
if (is_file($dir) || $dir == '.' || $dir == '..' || substr($dir, 0) == '.' || substr($dir, 0, 1) == '#') {
if (is_file($dir)
|| $dir == '.'
|| $dir == '..'
|| substr($dir, 0) == '.'
|| substr($dir, 0, 1) == '#'
) {
continue;
}

Expand Down Expand Up @@ -212,10 +217,10 @@ public function resizeHooks()

public function timeoutList()
{
$timeoutlist = '';
$timeoutList = '';
foreach ($this->timeouts as $timeout) {
$timeoutlist .= "kill_timeout('" . $timeout . "');";
$timeoutList .= "kill_timeout('" . $timeout . "');";
}
return $timeoutlist;
return $timeoutList;
}
}
2 changes: 1 addition & 1 deletion libraries/Kimai/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
class Kimai_Logger
{
private static $instance = null;
private static $instance;
private $file;

/**
Expand Down

0 comments on commit 3456266

Please sign in to comment.