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 1
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\sys\CpuPerformance;
13
14
use ZendDiagnostics\Check\CpuPerformance;
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 float $minPerformance The minimum performance ratio, where 1 is equal the computational
24
     *                              performance of AWS EC2 Micro Instance. For example, a value of 2 means
25
     *                              at least double the baseline experience, value of 0.5 means at least
26
     *                              half the performance. Defaults to 0.5
27
     *
28
     * @throws \InvalidArgumentException
29
     */
30 2
    public function __construct($minPerformance = 0.5)
31
    {
32 2
        $this->checker = new CpuPerformance($minPerformance);
33 2
    }
34
}
35