Completed
Push — master ( f35699...57fe2a )
by Бабичев
47s queued 45s
created

TidewaysProvider::disable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Bavix\XHProf\Providers;
4
5
use XHProfRuns_Default;
0 ignored issues
show
Bug introduced by
The type XHProfRuns_Default was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class TidewaysProvider implements ProviderInterface
8
{
9
10
    /**
11
     * @inheritDoc
12
     */
13
    public function enable()
14
    {
15
        $path = config('xhprof.path');
16
        include_once $path . '/xhprof_lib/utils/xhprof_lib.php';
17
        include_once $path . '/xhprof_lib/utils/xhprof_runs.php';
18
        tideways_xhprof_enable(config('xhprof.flags', 0));
0 ignored issues
show
Bug introduced by
The function tideways_xhprof_enable 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 ignore-call  annotation

18
        /** @scrutinizer ignore-call */ 
19
        tideways_xhprof_enable(config('xhprof.flags', 0));
Loading history...
19
    }
20
21
    /**
22
     * @inheritDoc
23
     */
24
    public function disable()
25
    {
26
        $data = tideways_xhprof_disable();
0 ignored issues
show
Bug introduced by
The function tideways_xhprof_disable 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 ignore-call  annotation

26
        $data = /** @scrutinizer ignore-call */ tideways_xhprof_disable();
Loading history...
27
        $runs = new XHProfRuns_Default();
28
        $runs->save_run($data, config('xhprof.name'));
29
    }
30
31
}
32