Completed
Push — master ( e19dd9...c43d00 )
by Freek
02:00
created

MySql::performNextRunInMinutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Spatie\ServerMonitor\CheckDefinitions;
4
5
use Symfony\Component\Process\Process;
6
7
final class MySql extends CheckDefinition
8
{
9
    public $command = 'ps -e | grep mysql';
10
11
    public function handleSuccessfulProcess(Process $process)
12
    {
13
        if (str_contains($process->getOutput(), 'mysql')) {
14
            $this->check->succeeded('is running');
15
16
            return;
17
        }
18
19
        $this->check->failed('is not running');
20
    }
21
}
22