Completed
Push — master ( d1f2d1...295638 )
by Vladimir
05:42
created

Check   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 8 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\php\ExtensionNotLoaded;
13
14
use Tvi\MonitorBundle\Check\CheckInterface;
15
use Tvi\MonitorBundle\Check\CheckTrait;
16
17
use ZendDiagnostics\Result\Failure;
18
use ZendDiagnostics\Result\Success;
19
20
/**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
21
 * @author Vladimir Turnaev <[email protected]>
22
 */
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...
23
class Check extends \ZendDiagnostics\Check\ExtensionLoaded implements CheckInterface
24
{
25
    use CheckTrait;
26
27
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
28
     * @return Failure|\ZendDiagnostics\Result\ResultInterface|Success
29
     */
30 2
    public function check()
31
    {
32 2
        $r = parent::check();
33 2
        if ($r instanceof Success) {
34 2
            return new Failure($r->getMessage(), $r->getData());
35
        }
36
37 1
        return new Success($r->getMessage(), $r->getData());
38
    }
39
}
40