Code Duplication    Length = 15-15 lines in 2 locations

src/CheckDefinitions/Memcached.php 1 location

@@ 8-22 (lines=15) @@
5
use Illuminate\Support\Str;
6
use Symfony\Component\Process\Process;
7
8
class Memcached extends CheckDefinition
9
{
10
    public $command = 'service memcached status';
11
12
    public function resolve(Process $process)
13
    {
14
        if (Str::contains($process->getOutput(), ['memcached is running', 'active (running)'])) {
15
            $this->check->succeed('is running');
16
17
            return;
18
        }
19
20
        $this->check->fail('is not running');
21
    }
22
}
23

src/CheckDefinitions/MySql.php 1 location

@@ 8-22 (lines=15) @@
5
use Illuminate\Support\Str;
6
use Symfony\Component\Process\Process;
7
8
class MySql extends CheckDefinition
9
{
10
    public $command = 'ps -e | grep mysqld$';
11
12
    public function resolve(Process $process)
13
    {
14
        if (Str::contains($process->getOutput(), 'mysql')) {
15
            $this->check->succeed('is running');
16
17
            return;
18
        }
19
20
        $this->check->fail('is not running');
21
    }
22
}
23