CodeCoverageGreatCheck   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
c 1
b 1
f 0
dl 0
loc 18
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A getKey() 0 3 1
A run() 0 4 2
1
<?php
2
3
namespace SilverStripe\ModuleRatings\Check;
4
5
class CodeCoverageGreatCheck extends AbstractCodeCoverageCheck
6
{
7
    protected $threshold = 75;
8
9
    public function getKey()
10
    {
11
        return 'great_code_coverage';
12
    }
13
14
    public function getDescription()
15
    {
16
        return 'Has a "great" level of code coverage (greater than ' . $this->threshold . '%, requires slug)';
17
    }
18
19
    public function run()
20
    {
21
        if ($this->getCoverage() >= $this->getThreshold()) {
22
            $this->setSuccessful(true);
23
        }
24
    }
25
}
26