| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function handle($request, Closure $next) |
||
| 18 | { |
||
| 19 | $this->response = $next($request); |
||
|
|
|||
| 20 | |||
| 21 | if ($this->shouldUseServerPush($request) && ! $request->is('stats')) { |
||
| 22 | app('server-push')->resources = collect(app('server-push')->resources)->reject(function ($resource) { |
||
| 23 | return str_contains($resource['path'], '/js/charts.'); |
||
| 24 | })->toArray(); |
||
| 25 | } |
||
| 26 | |||
| 27 | 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: