Code Duplication    Length = 13-13 lines in 2 locations

src/Comodojo/Daemon/Worker/Manager.php 2 locations

@@ 219-231 (lines=13) @@
216
217
    }
218
219
    public function pause($name = null) {
220
221
        if ( empty($name) ) {
222
            $result = [];
223
            foreach ($this->data as $name => $worker) {
224
                $result[$name] = $worker->getOutputChannel()->send('pause') > 0;
225
            }
226
            return $result;
227
        }
228
229
        return $this->get($name)->getOutputChannel()->send('pause') > 0;
230
231
    }
232
233
    public function resume($name = null) {
234
@@ 233-245 (lines=13) @@
230
231
    }
232
233
    public function resume($name = null) {
234
235
        if ( empty($name) ) {
236
            $result = [];
237
            foreach ($this->data as $name => $worker) {
238
                $result[$name] = $worker->getOutputChannel()->send('resume') > 0;
239
            }
240
            return $result;
241
        }
242
243
        return $this->get($name)->getOutputChannel()->send('resume') > 0;
244
245
    }
246
247
    public function running($pid) {
248