Info::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php namespace Comodojo\Extender\Socket\Commands\Queue;
2
3
use \Comodojo\Daemon\Daemon;
4
use \Comodojo\RpcServer\Request\Parameters;
5
6
class Info {
7
8
    public static function execute(Parameters $params, Daemon $daemon) {
9
10
        $configuration = $daemon->getConfiguration();
0 ignored issues
show
Bug introduced by
The method getConfiguration() does not exist on Comodojo\Daemon\Daemon. It seems like you code against a sub-type of Comodojo\Daemon\Daemon such as Comodojo\Extender\ExtenderDaemon. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

10
        /** @scrutinizer ignore-call */ 
11
        $configuration = $daemon->getConfiguration();
Loading history...
11
        $base_path = $configuration->get('base-path');
12
        $lock_path = $configuration->get('run-path');
13
        $lock_file = "$base_path/$lock_path/queue.worker.lock";
14
15
        return unserialize(file_get_contents($lock_file));
16
17
    }
18
19
}
20