Check::check()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
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\StreamWrapperExists;
13
14
use JMS\Serializer\Annotation as JMS;
15
use ZendDiagnostics\Check\StreamWrapperExists;
16
use Tvi\MonitorBundle\Check\CheckAbstract;
17
18
/**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
19
 * @JMS\ExclusionPolicy("all")
20
 *
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 CheckAbstract
24
{
25
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
26
     * @var StreamWrapperExists
27
     */
28
    private $checker;
0 ignored issues
show
Coding Style introduced by
Private member variable "checker" must be prefixed with an underscore
Loading history...
29
30
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
31
     * @param string|array|\Traversable $wrappers Stream wrapper name or an array of names
32
     *
33
     * @throws \InvalidArgumentException
34
     */
35 2
    public function __construct($wrappers)
36
    {
37 2
        $this->checker = new StreamWrapperExists($wrappers);
38 2
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
43 2
    public function check()
44
    {
45 2
        return $this->checker->check();
46
    }
47
}
48