1 | <?php |
||||
2 | |||||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||||
3 | namespace Hhxsv5\LaravelS\Components\Prometheus; |
||||
4 | |||||
5 | use Hhxsv5\LaravelS\Components\Prometheus\Collectors\SwooleProcessCollector; |
||||
6 | use Hhxsv5\LaravelS\Swoole\Timer\CronJob; |
||||
7 | |||||
8 | class TimerProcessMetricsCronJob extends CronJob |
||||
0 ignored issues
–
show
|
|||||
9 | { |
||||
10 | public function interval() |
||||
0 ignored issues
–
show
|
|||||
11 | { |
||||
12 | return config('prometheus.collect_metrics_interval', 10) * 1000; |
||||
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
13 | } |
||||
14 | |||||
15 | public function isImmediate() |
||||
0 ignored issues
–
show
|
|||||
16 | { |
||||
17 | return true; |
||||
18 | } |
||||
19 | |||||
20 | public function run() |
||||
0 ignored issues
–
show
|
|||||
21 | { |
||||
22 | /**@var SwooleProcessCollector $processCollector */ |
||||
0 ignored issues
–
show
|
|||||
23 | $processCollector = app(SwooleProcessCollector::class); |
||||
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
24 | $processCollector->collect([ |
||||
0 ignored issues
–
show
|
|||||
25 | 'process_id' => 'timer', |
||||
26 | 'process_type' => 'timer', |
||||
27 | ]); |
||||
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
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.
![]() |
|||||
28 | } |
||||
29 | } |