Completed
Push — master ( 88eea6...1145d2 )
by Freek
02:10
created

Memcached   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 15
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 10 2
1
<?php
2
3
namespace Spatie\ServerMonitor\CheckDefinitions;
4
5
use Symfony\Component\Process\Process;
6
7
final class Memcached extends CheckDefinition
8
{
9
    public $command = 'service memcached status';
10
11
    public function resolve(Process $process)
12
    {
13
        if (str_contains($process->getOutput(), 'memcached is running')) {
14
            $this->check->succeed('is running');
15
16
            return;
17
        }
18
19
        $this->check->fail('is not running');
20
    }
21
}
22