| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | private function normalizeView(array $views): array | 
| 23 | 23 |      { | 
| 24 | 24 | $views = $this->normalizeInput($views); | 
| 25 | -        $mapper = function ($view) { | |
| 25 | +        $mapper = function($view) { | |
| 26 | 26 | return 'creating: '.$view; | 
| 27 | 27 | }; | 
| 28 | 28 | |
| @@ -41,7 +41,7 @@ | ||
| 41 | 41 | private function normalizeModel($target, array $model): array | 
| 42 | 42 |      { | 
| 43 | 43 | $model = $this->normalizeInput($model); | 
| 44 | -        $mapper = function ($model) use ($target) { | |
| 44 | +        $mapper = function($model) use ($target) { | |
| 45 | 45 |              return "eloquent.{$target}: {$model}"; | 
| 46 | 46 | }; | 
| 47 | 47 | |
| @@ -18,7 +18,7 @@ discard block | ||
| 18 | 18 | $guardName = $model->guard_name ?? null; | 
| 19 | 19 | } | 
| 20 | 20 | |
| 21 | -        if (! isset($guardName)) { | |
| 21 | +        if (!isset($guardName)) { | |
| 22 | 22 | $class = is_object($model) ? get_class($model) : $model; | 
| 23 | 23 | |
| 24 | 24 | $guardName = (new \ReflectionClass($class))->getDefaultProperties()['guard_name'] ?? null; | 
| @@ -29,14 +29,14 @@ discard block | ||
| 29 | 29 | } | 
| 30 | 30 | |
| 31 | 31 |          return collect(config('auth.guards')) | 
| 32 | -            ->map(function ($guard) { | |
| 33 | -                if (! isset($guard['provider'])) { | |
| 32 | +            ->map(function($guard) { | |
| 33 | +                if (!isset($guard['provider'])) { | |
| 34 | 34 | return; | 
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | 37 |                  return config("auth.providers.{$guard['provider']}.model"); | 
| 38 | 38 | }) | 
| 39 | -            ->filter(function ($model) use ($class) { | |
| 39 | +            ->filter(function($model) use ($class) { | |
| 40 | 40 | return $class === $model; | 
| 41 | 41 | }) | 
| 42 | 42 | ->keys(); | 
| @@ -23,7 +23,7 @@ discard block | ||
| 23 | 23 | Gate::define($gate, $gate); | 
| 24 | 24 | } | 
| 25 | 25 | |
| 26 | -        $this->predicate = function () use ($gate, $args) { | |
| 26 | +        $this->predicate = function() use ($gate, $args) { | |
| 27 | 27 | return Gate::allows($gate, $args); | 
| 28 | 28 | }; | 
| 29 | 29 | |
| @@ -32,7 +32,7 @@ discard block | ||
| 32 | 32 | |
| 33 | 33 | public function youShouldBeGuest() | 
| 34 | 34 |      { | 
| 35 | -        $this->predicate = function () { | |
| 35 | +        $this->predicate = function() { | |
| 36 | 36 | return auth()->guest(); | 
| 37 | 37 | }; | 
| 38 | 38 | |
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | |
| 42 | 42 | public function youShouldBeLoggedIn() | 
| 43 | 43 |      { | 
| 44 | -        $this->predicate = function () { | |
| 44 | +        $this->predicate = function() { | |
| 45 | 45 | return auth()->check(); | 
| 46 | 46 | }; | 
| 47 | 47 | |
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | |
| 51 | 51 | public function immediately() | 
| 52 | 52 |      { | 
| 53 | -        $this->predicate = function () { | |
| 53 | +        $this->predicate = function() { | |
| 54 | 54 | return false; | 
| 55 | 55 | }; | 
| 56 | 56 | |
| @@ -71,7 +71,7 @@ | ||
| 71 | 71 | }; | 
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | -        return function () { | |
| 74 | +        return function() { | |
| 75 | 75 | }; | 
| 76 | 76 | } | 
| 77 | 77 | } | 
| 78 | 78 | \ No newline at end of file | 
| @@ -16,7 +16,7 @@ discard block | ||
| 16 | 16 | |
| 17 | 17 |          $role = static::where('id', $id)->where('guard_name', $guardName)->first(); | 
| 18 | 18 | |
| 19 | -        if (! $role) { | |
| 19 | +        if (!$role) { | |
| 20 | 20 | throw RoleDoesNotExist::withId($id); | 
| 21 | 21 | } | 
| 22 | 22 | |
| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | |
| 30 | 30 |          $role = static::where('name', $name)->where('guard_name', $guardName)->first(); | 
| 31 | 31 | |
| 32 | -        if (! $role) { | |
| 32 | +        if (!$role) { | |
| 33 | 33 | throw RoleDoesNotExist::named($name); | 
| 34 | 34 | } | 
| 35 | 35 | |
| @@ -13,10 +13,10 @@ discard block | ||
| 13 | 13 |      { | 
| 14 | 14 | $roles = collect($roles) | 
| 15 | 15 | ->flatten() | 
| 16 | -            ->map(function ($role) { | |
| 16 | +            ->map(function($role) { | |
| 17 | 17 | return $this->getStoredRole($role); | 
| 18 | 18 | }) | 
| 19 | -            ->each(function ($role) { | |
| 19 | +            ->each(function($role) { | |
| 20 | 20 | $this->ensureModelSharesGuard($role); | 
| 21 | 21 | }) | 
| 22 | 22 | ->all(); | 
| @@ -99,7 +99,7 @@ discard block | ||
| 99 | 99 | |
| 100 | 100 | protected function ensureModelSharesGuard($roleOrPermission) | 
| 101 | 101 |      { | 
| 102 | -        if (! $this->getGuardNames()->contains($roleOrPermission->guard_name)) { | |
| 102 | +        if (!$this->getGuardNames()->contains($roleOrPermission->guard_name)) { | |
| 103 | 103 | throw GuardDoesNotMatch::create($roleOrPermission->guard_name, $this->getGuardNames()); | 
| 104 | 104 | } | 
| 105 | 105 | } | 
| @@ -119,7 +119,7 @@ discard block | ||
| 119 | 119 |              return explode('|', $pipeString); | 
| 120 | 120 | } | 
| 121 | 121 | |
| 122 | -        if (! in_array($quoteCharacter, ["'", '"'])) { | |
| 122 | +        if (!in_array($quoteCharacter, ["'", '"'])) { | |
| 123 | 123 |              return explode('|', $pipeString); | 
| 124 | 124 | } | 
| 125 | 125 | |
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 |  { | 
| 10 | 10 | public function authorizeMatchedRoutes(): void | 
| 11 | 11 |      { | 
| 12 | -        Route::matched(function (RouteMatched $eventObj) { | |
| 12 | +        Route::matched(function(RouteMatched $eventObj) { | |
| 13 | 13 | $route = $eventObj->route; | 
| 14 | 14 | $this->authorizeUrls($route->uri); | 
| 15 | 15 | $this->authorizeRouteNames($route->getName()); | 
| @@ -31,7 +31,7 @@ | ||
| 31 | 31 | |
| 32 | 32 | private function defineGates(): void | 
| 33 | 33 |      { | 
| 34 | -        Gate::define('heyman.youShouldHaveRole', function ($user, $role) { | |
| 34 | +        Gate::define('heyman.youShouldHaveRole', function($user, $role) { | |
| 35 | 35 | return $user->hasRole($role); | 
| 36 | 36 | }); | 
| 37 | 37 | } |