Completed
Push — master ( 6a1d32...edb848 )
by Marcel
16:55
created

CustomizeGrouping::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Facade\Ignition\Middleware;
4
5
use Facade\FlareClient\Report;
6
use Facade\FlareClient\Enums\GroupingTypes;
7
8
class CustomizeGrouping
9
{
10
    protected $groupingType;
11
12
    public function __construct($groupingType)
13
    {
14
        $this->groupingType = $groupingType;
15
    }
16
17
    public function handle(Report $report, $next)
18
    {
19
        $report->groupByTopFrame();
20
21
        if ($this->groupingType === GroupingTypes::EXCEPTION) {
22
            $report->groupByException();
23
        }
24
25
        return $next($report);
26
    }
27
}
28