Completed
Push — master ( 795985...281665 )
by Sam
14s queued 10s
created

NewRelicBackgroundJobMiddleware::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Nord\Lumen\NewRelic;
4
5
use Closure;
6
use Illuminate\Http\Request;
7
8
/**
9
 * Class NewRelicBackgroundJobMiddleware
10
 * @package Nord\Lumen\NewRelic
11
 */
12
class NewRelicBackgroundJobMiddleware extends NewRelicMiddleware
13
{
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function handle(Request $request, Closure $next)
19
    {
20
        // Mark the request as a background job
21
        $this->newRelic->backgroundJob();
22
23
        return $next($request);
24
    }
25
}
26