AddGlows::handle()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Facade\FlareClient\Middleware;
4
5
use Facade\FlareClient\Glows\Recorder;
6
use Facade\FlareClient\Report;
7
8
class AddGlows
9
{
10
    /** @var Recorder */
11
    private $recorder;
12
13
    public function __construct(Recorder $recorder)
14
    {
15
        $this->recorder = $recorder;
16
    }
17
18
    public function handle(Report $report, $next)
19
    {
20
        foreach ($this->recorder->glows() as $glow) {
21
            $report->addGlow($glow);
22
        }
23
24
        return $next($report);
25
    }
26
}
27