for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Leankoala\HealthFoundation\Filter\Basic;
use Leankoala\HealthFoundation\Check\Result;
use Leankoala\HealthFoundation\Filter\BasicFilter;
class TimeFilter extends BasicFilter
{
private $startDateTime;
private $endDateTime;
public function init($month, $day, $hour, $minute, $interval)
$day
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function init($month, /** @scrutinizer ignore-unused */ $day, $hour, $minute, $interval)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$interval
public function init($month, $day, $hour, $minute, /** @scrutinizer ignore-unused */ $interval)
$minute
public function init($month, $day, $hour, /** @scrutinizer ignore-unused */ $minute, $interval)
$month
public function init(/** @scrutinizer ignore-unused */ $month, $day, $hour, $minute, $interval)
$hour
public function init($month, $day, /** @scrutinizer ignore-unused */ $hour, $minute, $interval)
throw new \RuntimeException('This filter is not implemented yet');
$this->startDateTime = new \DateTime($startDateTime);
$this->startDateTime = n...ateTime($startDateTime)
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.
return
die
exit
function fx() { try { doSomething(); return true; } catch (\Exception $e) { return false; } return false; }
In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.
return false
$this->endDateTime = new \DateTime($endDateTime);
}
public function run()
$result = $this->getCheck()->run();
// @todo handle metric aware checks
if ($result->getStatus() == Result::STATUS_FAIL) {
} else {
return $result;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.