Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
medz authored and StyleCIBot committed Mar 15, 2018
1 parent 2ab9858 commit 3be6f7e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'methods' => ['*'], // ex: GET, POST, PUT, PATCH, DELETE
'max-age' => 0,
'laravel' => [
'allow-route-perfix' => '*', // The perfix is using \Illumante\Http\Request::is method. 👉
'allow-route-perfix' => '*', // The perfix is using \Illumante\Http\Request::is method. 👉
'route-grouo-mode' => false,
],
];
7 changes: 5 additions & 2 deletions src/Laravel/Middleware/Cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
namespace Medz\Cors\Laravel\Middleware;

use Closure;
use Route;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Foundation\Http\Events\RequestHandled;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Medz\Cors\CorsInterface;
use Route;

class Cors
{
Expand Down Expand Up @@ -82,7 +82,9 @@ public function handle($request, Closure $next)
* Has should route group.
*
* @param mixed $request
*
* @return bool
*
* @author Seven Du <[email protected]>
*/
protected function hasShouldRouteGroup($request): bool
Expand Down Expand Up @@ -111,12 +113,13 @@ protected function hasShouldRouteGroup($request): bool
* Has the request allow route perfix.
*
* @param \Illumante\Http\Request $request
*
* @return bool
*
* @author Seven Du <[email protected]>
*/
protected function hasAllowRoutePerfix($request): bool
{

return $request->is(config('cors.laravel.allow-route-perfix'));
}

Expand Down
4 changes: 3 additions & 1 deletion src/Laravel/Middleware/ShouldGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ class ShouldGroup
/**
* The should group handle.
*
* @param mixed $request
* @param mixed $request
* @param Closure $next
*
* @return mixed
*
* @author Seven Du <[email protected]>
*/
public function handle($request, Closure $next)
Expand Down

0 comments on commit 3be6f7e

Please sign in to comment.