AddGlows   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 8 2
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