Completed
Push — master ( 717b1b...de6dfe )
by Dmitry
06:37
created

Metrics   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 13
ccs 0
cts 10
cp 0
rs 10
c 2
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 1
1
<?php
2
3
namespace Basis\Jobs\Service;
4
5
use Basis\Application;
6
7
/**
8
 * Get Metrics information
9
 */
10
class Metrics
11
{
12
    public function run(Application $app)
13
    {
14
        return [
15
            'memory_usage' => memory_get_usage(),
16
            'memory_usage_real' => memory_get_usage(true),
17
            'memory_peak_usage' => memory_get_peak_usage(),
18
            'memory_peak_usage_real' => memory_get_peak_usage(true),
19
            'uptime' => round($app->getRunningTime()),
0 ignored issues
show
Bug introduced by
The method getRunningTime() does not seem to exist on object<Basis\Application>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
        ];
21
    }
22
}