| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 12 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 3.243 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 17 | 1 | public function handle($request, Closure $next)  | 
            |
| 18 |     { | 
            ||
| 19 | 1 | $this->response = $next($request);  | 
            |
| 
                                                                                                    
                        
                         | 
                |||
| 20 | |||
| 21 | 1 |         if ($this->shouldUseServerPush($request) && ! $request->is('stats')) { | 
            |
| 22 | 1 |             app('server-push')->resources = collect(app('server-push')->resources)->reject(function ($resource) { | 
            |
| 23 | 1 | return str_contains($resource['path'], '/js/charts.');  | 
            |
| 24 | 1 | })->toArray();  | 
            |
| 25 | }  | 
            ||
| 26 | |||
| 27 | 1 | return $this->response;  | 
            |
| 28 | }  | 
            ||
| 29 | |||
| 40 | 
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: