Code Duplication    Length = 8-12 lines in 2 locations

src/Pool.php 2 locations

@@ 26-33 (lines=8) @@
23
        return true;
24
    }
25
26
    public function remove($id)
27
    {
28
        if (!isset($this->_jobs[$id])) {
29
            throw new \InvalidArgumentException('id does not exist in pool');
30
        }
31
        unset($this->_jobs[$id]);
32
        return true;
33
    }
34
35
    public function &get($id = null)
36
    {
@@ 35-46 (lines=12) @@
32
        return true;
33
    }
34
35
    public function &get($id = null)
36
    {
37
        if ($id) {
38
            if (!isset($this->_jobs[$id])) {
39
                throw new \InvalidArgumentException('id does not exist in pool');
40
            }
41
            return $this->_results[$id];
42
        } else {
43
            // All
44
            return $this->_results;
45
        }
46
    }
47
48
    public function &run()
49
    {