for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Actuator\Silex\Controller;
use Silex\Application;
use Actuator\Health\Indicator\CompositeHealthIndicator;
use Symfony\Component\HttpFoundation\Request;
class HealthController
{
public function __invoke(Application $app, Request $request)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$healthAggregator = $app['health.aggregator'];
$healthIndicators = $app['health.indicators'];
assert(!is_null($healthAggregator), "health.aggregator must not be null");
assert(!is_null($healthIndicators), "health.indicators must not be null");
$healthIndicator = new CompositeHealthIndicator($healthAggregator);
foreach ($healthIndicators as $key => $entry) {
$healthIndicator->addHealthIndicator($key, $entry);
}
return $healthIndicator->health();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.