Skip to content

Commit

Permalink
More phpmd fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Oct 20, 2016
1 parent 3322c64 commit a00d3ac
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 deletions.
8 changes: 4 additions & 4 deletions lib/errors.php
Expand Up @@ -280,16 +280,16 @@ private function send($httpcode, $message)
// Send as email handler
if ($error_actions[$httpcode]['action'] == 'email')
{
$this->_send_email($httpcode, $msg, $error_actions[$httpcode]);
$this->_send_email($msg, $error_actions[$httpcode]);
}
// Append to log file handler
else if ($error_actions[$httpcode]['action'] == 'log')
{
$this->_log($httpcode, $msg, $error_actions[$httpcode]);
$this->_log($msg, $error_actions[$httpcode]);
}
}

private function _log($httpcode, $msg, array $config)
private function _log($msg, array $config)
{
if (empty($config['filename']))
{
Expand All @@ -310,7 +310,7 @@ private function _log($httpcode, $msg, array $config)
$logger->log($msg, MIDCOM_LOG_INFO);
}

private function _send_email($httpcode, $msg, array $config)
private function _send_email($msg, array $config)
{
if (empty($config['email']))
{
Expand Down
3 changes: 1 addition & 2 deletions lib/midcom/services/auth/main.php
Expand Up @@ -363,10 +363,9 @@ private function is_admin($user)
* @param midcom_core_user $user The user against which to check the privilege, defaults to the currently authenticated user,
* you may specify 'EVERYONE' here to check what an anonymous user can do.
* @param string $class Optional parameter to set if the check should take type specific permissions into account. The class must be default constructible.
* @param string $component Component providing the class
* @return boolean True if the privilege has been granted, false otherwise.
*/
public function can_user_do($privilege, $user = null, $class = null, $component = null)
public function can_user_do($privilege, $user = null, $class = null)
{
if ($this->is_admin($user))
{
Expand Down
6 changes: 3 additions & 3 deletions lib/midcom/services/auth/sessionmgr.php
Expand Up @@ -272,7 +272,7 @@ private function _do_midgard_auth($username, $password)
}
$this->user = midcom_connection::login($username, $password);

return $this->_load_person($username);
return $this->_load_person();
}

/**
Expand All @@ -291,10 +291,10 @@ private function _do_trusted_midgard_auth($username)

$this->user = midcom_connection::login($username, '', true);

return $this->_load_person($username);
return $this->_load_person();
}

private function _load_person($username)
private function _load_person()
{
if (!$this->user)
{
Expand Down
8 changes: 4 additions & 4 deletions lib/midcom/services/toolbars.php
Expand Up @@ -371,7 +371,7 @@ function show_node_toolbar($context_id = null)
{
if (!$this->_centralized_mode)
{
echo $this->render_node_toolbar();
echo $this->render_node_toolbar($context_id);
}
}

Expand All @@ -387,7 +387,7 @@ function show_host_toolbar($context_id = null)
{
if (!$this->_centralized_mode)
{
echo $this->render_host_toolbar();
echo $this->render_host_toolbar($context_id);
}
}

Expand All @@ -403,7 +403,7 @@ function show_view_toolbar($context_id = null)
{
if (!$this->_centralized_mode)
{
echo $this->render_view_toolbar();
echo $this->render_view_toolbar($context_id);
}
}

Expand All @@ -419,7 +419,7 @@ function show_help_toolbar($context_id = null)
{
if (!$this->_centralized_mode)
{
echo $this->render_help_toolbar();
echo $this->render_help_toolbar($context_id);
}
}

Expand Down
7 changes: 0 additions & 7 deletions lib/net/nehmer/comments/handler/moderate.php
Expand Up @@ -20,13 +20,6 @@ class net_nehmer_comments_handler_moderate extends midcom_baseclasses_components
*/
private $_comment;

/**
* The GUID of the object we're bound to.
*
* @var string GUID
*/
private $_objectguid;

/**
* Marks comment as possible abuse
*
Expand Down
1 change: 0 additions & 1 deletion lib/org/openpsa/widgets/calendar/main.php
Expand Up @@ -33,7 +33,6 @@ public static function add_head_elements()
if ($lang)
{
$head->add_jsfile(MIDCOM_STATIC_URL . $prefix . "locale/{$lang}.js");
$options['lang'] = $lang;
}

$head->add_stylesheet(MIDCOM_STATIC_URL . $prefix . 'fullcalendar.min.css');
Expand Down

0 comments on commit a00d3ac

Please sign in to comment.