File "AddQueries.php"

Full Path: /home/fundopuh/trader.fxex.org/vendor/facade/ignition/src/Middleware/AddQueries.php
File size: 527 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Facade\Ignition\Middleware;

use Facade\FlareClient\Report;
use Facade\Ignition\QueryRecorder\QueryRecorder;

class AddQueries
{
    /** @var \Facade\Ignition\QueryRecorder\QueryRecorder */
    protected $queryRecorder;

    public function __construct(QueryRecorder $queryRecorder)
    {
        $this->queryRecorder = $queryRecorder;
    }

    public function handle(Report $report, $next)
    {
        $report->group('queries', $this->queryRecorder->getQueries());

        return $next($report);
    }
}