Skip to content

Commit 17643c6

Browse files
bhavingajjarStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 987f57e commit 17643c6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Middleware/ApiHeaderInject.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
<?php
2+
23
namespace Bhavingajjar\LaravelApiGenerator\Middleware;
34

45
use Closure;
5-
use Illuminate\Http\Response;
66
use Illuminate\Support\Facades\Config;
77

88
class ApiHeaderInject
99
{
1010
public function handle($request, Closure $next)
1111
{
12-
if(config('laravel-api-generator.json_response')) {
12+
if (config('laravel-api-generator.json_response')) {
1313
$request->headers->add([
1414
'Accept'=>'application/json',
15-
'Content-Type'=>'application/json'
15+
'Content-Type'=>'application/json',
1616
]);
1717
}
18-
if(config('laravel-api-generator.allow_cross_origin')) {
18+
if (config('laravel-api-generator.allow_cross_origin')) {
1919
$request->headers->add([
2020
'Access-Control-Allow-Origin' => '*',
21-
'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS'
21+
'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS',
2222
]);
2323
}
24+
2425
return $next($request);
2526
}
2627
}

0 commit comments

Comments
 (0)