for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace whm\Smoke\Extensions\SmokeOnFailure;
use Psr\Http\Message\ResponseInterface;
use whm\Smoke\Rules\CheckResult;
class OnFailureExtension
{
private $callback;
public function init($command)
$this->callback = function () use ($command) {
return eval($command);
};
}
/**
* @param CheckResult[] $results
* @Event("Scanner.Scan.Validate")
*/
public function process($results, ResponseInterface $response)
$response
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
foreach ($results as $result) {
if ($result->getStatus() == CheckResult::STATUS_FAILURE) {
$callback = $this->callback;
$callback();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.