for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class Logger_Syslog {
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function log_error($errno, $errstr, $file, $line, $context) {
$context
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function log_error($errno, $errstr, $file, $line, /** @scrutinizer ignore-unused */ $context) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
switch ($errno) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_COMPILE_ERROR:
case E_USER_ERROR:
$priority = LOG_ERR;
break;
case E_WARNING:
case E_CORE_WARNING:
case E_COMPILE_WARNING:
case E_USER_WARNING:
$priority = LOG_WARNING;
default:
$priority = LOG_INFO;
}
$errname = Logger::$errornames[$errno]." ($errno)";
syslog($priority, "[tt-rss] $errname ($file:$line) $errstr");
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.