Code Duplication    Length = 12-12 lines in 2 locations

Server/Server.php 2 locations

@@ 60-71 (lines=12) @@
57
    /**
58
     * {@inheritdoc}
59
     */
60
    public function getProcessUsage($processName)
61
    {
62
        $usage = 0;
63
64
        foreach ($this->getProcesses() as $process) {
65
            if (strpos($process['name'], $processName) !== false) {
66
                $usage += $process['usage'];
67
            }
68
        }
69
70
        return $usage;
71
    }
72
73
    /**
74
     * {@inheritdoc}
@@ 76-87 (lines=12) @@
73
    /**
74
     * {@inheritdoc}
75
     */
76
    public function getProcessCount($command)
77
    {
78
        $count = 0;
79
80
        foreach ($this->getProcesses() as $process) {
81
            if (strpos($process['name'], $command) !== false) {
82
                $count++;
83
            }
84
        }
85
86
        return $count;
87
    }
88
89
    /**
90
     * {@inheritdoc}