Code Duplication    Length = 18-18 lines in 2 locations

src/Logger/FlareHandler.php 1 location

@@ 12-29 (lines=18) @@
9
use Facade\Ignition\Tabs\Tab;
10
use Monolog\Handler\AbstractProcessingHandler;
11
12
class FlareHandler extends BaseFlareHandler
13
{
14
    protected function write(array $report): void
15
    {
16
        if ($this->shouldReport($report)) {
17
18
            /** @var Throwable $throwable */
19
            $throwable = $report['context']['exception'];
20
21
            collect(Ignition::$tabs)
22
                ->each(function (Tab $tab) use ($throwable) {
23
                    $tab->beforeRenderingErrorPage($this->flare, $throwable);
24
                });
25
26
            $this->flare->report($report['context']['exception']);
27
        }
28
    }
29
}
30

src/Logger/FlareHandlerPhp71.php 1 location

@@ 12-29 (lines=18) @@
9
use Facade\Ignition\Tabs\Tab;
10
use Monolog\Handler\AbstractProcessingHandler;
11
12
class FlareHandlerPhp71 extends BaseFlareHandler
13
{
14
    protected function write(array $report)
15
    {
16
        if ($this->shouldReport($report)) {
17
18
            /** @var Throwable $throwable */
19
            $throwable = $report['context']['exception'];
20
21
            collect(Ignition::$tabs)
22
                ->each(function (Tab $tab) use ($throwable) {
23
                    $tab->beforeRenderingErrorPage($this->flare, $throwable);
24
                });
25
26
            $this->flare->report($report['context']['exception']);
27
        }
28
    }
29
}
30