ReactBasedOnThreshold::shouldReact()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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
}