Completed
Push — master ( 872461...e70e08 )
by Vladimir
06:10
created

Check   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 6 2
1
<?php
2
3
/**
4
 * This file is part of the `tvi/monitor-bundle` project.
5
 *
6
 * (c) https://github.com/turnaev/monitor-bundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
11
12
namespace Tvi\MonitorBundle\Check\redis\Redis;
13
14
use Tvi\MonitorBundle\Check\CheckInterface;
15
16
use Tvi\MonitorBundle\Check\CheckTrait;
17
use ZendDiagnostics\Result\Failure;
18
19
/**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
20
 * @author Vladimir Turnaev <[email protected]>
21
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
22
class Check extends \ZendDiagnostics\Check\Redis implements CheckInterface
23
{
24
    use CheckTrait;
25
26
    /**
27
     * Perform the check.
28
     *
29
     * @see \ZendDiagnostics\Check\CheckInterface::check()
30
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
31 2
    public function check()
32
    {
33
        try {
34 2
            return parent::check();
35
        } catch (\Exception $e) {
36
            return new Failure($e->getMessage());
37
        }
38
    }
39
}
40