Completed
Push — master ( 8cfc77...3ca914 )
by Vladimir
06:29
created

Check::__construct()   A

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 3
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\fs\DiskUsage;
13
14
use ZendDiagnostics\Check\DiskUsage;
15
use Tvi\MonitorBundle\Check\CheckAbstract;
16
17
/**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
18
 * @author Vladimir Turnaev <[email protected]>
19
 */
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...
20
class Check extends CheckAbstract
21
{
22
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
23
     * @param int    $warningThreshold  A number between 0 and 100
24
     * @param int    $criticalThreshold A number between 0 and 100
25
     * @param string $path              The disk path to check, i.e. '/tmp' or 'C:' (defaults to /)
26
     *
27
     * @throws InvalidArgumentException
28
     */
29 2
    public function __construct($warningThreshold, $criticalThreshold, $path = '/')
30
    {
31 2
        $this->checker = new DiskUsage($warningThreshold, $criticalThreshold, $path);
32 2
    }
33
}
34