Code Duplication    Length = 10-10 lines in 2 locations

src/Comodojo/Extender/Queue/SocketCommands.php 1 location

@@ 36-45 (lines=10) @@
33
34
    }
35
36
    public function queueInfo(Process $daemon, $data = null) {
37
38
        $configuration = $daemon->getConfiguration();
39
        $base_path = $configuration->get('base-path');
40
        $lock_path = $configuration->get('run-path');
41
        $lock_file = "$base_path/$lock_path/queue.worker.lock";
42
43
        return unserialize(file_get_contents($lock_file));
44
45
    }
46
47
    protected static function getManager(Process $daemon) {
48

src/Comodojo/Extender/Schedule/SocketCommands.php 1 location

@@ 122-131 (lines=10) @@
119
120
    }
121
122
    public function schedulerInfo(Process $daemon, $data = null) {
123
124
        $configuration = $daemon->getConfiguration();
125
        $base_path = $configuration->get('base-path');
126
        $lock_path = $configuration->get('run-path');
127
        $lock_file = "$base_path/$lock_path/schedule.worker.lock";
128
129
        return unserialize(file_get_contents($lock_file));
130
131
    }
132
133
    protected static function getManager(Process $daemon) {
134