Conditions | 4 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace GeneaLabs\LaravelCaffeine\Http\Middleware; |
||
9 | public function handle(Request $request, Closure $next) |
||
10 | { |
||
11 | $response = $next($request); |
||
12 | $content = $response->getContent(); |
||
13 | |||
14 | if (is_string($content) |
||
15 | && (strpos($content, '_token') |
||
16 | || (preg_match("/\<meta name=[\"\']csrf[_-]token[\"\']/", $content))) |
||
17 | ) { |
||
18 | $dripper = (new Dripper); |
||
19 | $content = str_replace( |
||
20 | '</body>', |
||
21 | "{$dripper->html}</body>", |
||
22 | $content |
||
23 | ); |
||
24 | $response->setContent($content); |
||
25 | } |
||
26 | |||
27 | return $response; |
||
28 | } |
||
30 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths