for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Hhxsv5\LaravelS\Components\Prometheus;
use Hhxsv5\LaravelS\Components\Prometheus\Collectors\SwooleProcessCollector;
use Hhxsv5\LaravelS\Swoole\Timer\CronJob;
class TimerProcessMetricsCronJob extends CronJob
{
public function interval()
return config('prometheus.collect_metrics_interval', 10) * 1000;
config
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ config('prometheus.collect_metrics_interval', 10) * 1000;
}
public function isImmediate()
return true;
public function run()
/**@var SwooleProcessCollector $processCollector */
$processCollector = app(SwooleProcessCollector::class);
app
$processCollector = /** @scrutinizer ignore-call */ app(SwooleProcessCollector::class);
$processCollector->collect([
'process_id' => 'timer',
'process_type' => 'timer',
]);
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:
someFunctionCall( $firstArgument, $secondArgument, $thirdArgument ); // Closing parenthesis on a new line.