for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SimpleLogger\Utils;
use SimpleLogger\Configuration;
use SimpleLogger\SimpleLogger;
use Psr\Log\LogLevel;
class Logger extends SimpleLogger
{
/**
* Constructor.
*
* @param string $logfile
* @return object
*/
public function __construct($logfile)
$configuration = new Configuration();
$configuration
->setLogFile($logfile)
->setVerbosity(LogLevel::NOTICE)
->setConsoleVerbosity(LogLevel::INFO)
->setLoggerConsoleFormat("%t %l %c:%f %m")
->setLoggerFileFormat("%t %l %c:%f %p %m");
return parent::__construct($configuration);
parent::__construct($configuration)
SimpleLogger\SimpleLogger::__construct()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
return parent::__construct($configuration)
void
object
}
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.