Completed
Pull Request — master (#11)
by Sam
07:35
created

NewRelicBackgroundJobMiddleware   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

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