ReactBasedOnThreshold   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A shouldReact() 0 4 1
1
<?php
2
3
4
namespace Ionut\Sylar\Reactions\Traits;
5
6
7
use Ionut\Sylar\Report;
8
9
trait ReactBasedOnThreshold
10
{
11
    /**
12
     * @var int
13
     */
14
    protected $threshold = 0;
15
16
    public function shouldReact(Report $report)
17
    {
18
        return $report->getTotalImpact() > $this->threshold;
19
    }
20
}