| @@ -20,7 +20,7 @@ | ||
| 20 | 20 | */ | 
| 21 | 21 | public function getDefaultDriver() | 
| 22 | 22 |      { | 
| 23 | - return $this->app['config']['doorman.driver']; | |
| 23 | + return $this->app[ 'config' ][ 'doorman.driver' ]; | |
| 24 | 24 | } | 
| 25 | 25 | |
| 26 | 26 | public function createBasicDriver() | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 | * @return $this | 
| 61 | 61 | * @throws \Clarkeash\Doorman\Exceptions\DuplicateException | 
| 62 | 62 | */ | 
| 63 | - public function for(string $email) | |
| 63 | + public function for (string $email) | |
| 64 | 64 |      { | 
| 65 | 65 |          if ($this->invite->where('for', strtolower($email))->first()) { | 
| 66 | 66 |              throw new DuplicateException('You cannot create more than 1 invite code for an email'); | 
| @@ -87,7 +87,7 @@ discard block | ||
| 87 | 87 |          try { | 
| 88 | 88 |              return $this->invite->where('code', '=', Str::upper($code))->firstOrFail(); | 
| 89 | 89 |          } catch (ModelNotFoundException $e) { | 
| 90 | -            throw new InvalidInviteCode(trans('doorman::messages.invalid', ['code' => $code])); | |
| 90 | +            throw new InvalidInviteCode(trans('doorman::messages.invalid', [ 'code' => $code ])); | |
| 91 | 91 | } | 
| 92 | 92 | } | 
| 93 | 93 | |
| @@ -102,15 +102,15 @@ discard block | ||
| 102 | 102 | protected function validateInvite(BaseInvite $invite, string $email = null) | 
| 103 | 103 |      { | 
| 104 | 104 |          if ($invite->isFull()) { | 
| 105 | -            throw new MaxUsesReached(trans('doorman::messages.maxed', ['code' => $invite->code])); | |
| 105 | +            throw new MaxUsesReached(trans('doorman::messages.maxed', [ 'code' => $invite->code ])); | |
| 106 | 106 | } | 
| 107 | 107 | |
| 108 | 108 |          if ($invite->hasExpired()) { | 
| 109 | -            throw new ExpiredInviteCode(trans('doorman::messages.expired', ['code' => $invite->code])); | |
| 109 | +            throw new ExpiredInviteCode(trans('doorman::messages.expired', [ 'code' => $invite->code ])); | |
| 110 | 110 | } | 
| 111 | 111 | |
| 112 | 112 |          if ($invite->isRestricted() && !$invite->isRestrictedFor($email)) { | 
| 113 | -            throw new NotYourInviteCode(trans('doorman::messages.restricted', ['code' => $invite->code])); | |
| 113 | +            throw new NotYourInviteCode(trans('doorman::messages.restricted', [ 'code' => $invite->code ])); | |
| 114 | 114 | } | 
| 115 | 115 | } | 
| 116 | 116 | |
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | ); | 
| 47 | 47 | |
| 48 | 48 |          $this->app->bind(BaseInvite::class, function($app) { | 
| 49 | - return new $app['config']['doorman.invite_model']; | |
| 49 | + return new $app[ 'config' ][ 'doorman.invite_model' ]; | |
| 50 | 50 | }); | 
| 51 | 51 | |
| 52 | 52 |          $this->app->bind('doorman', Doorman::class); | 
| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | */ | 
| 18 | 18 | abstract class BaseInvite extends Model | 
| 19 | 19 |  { | 
| 20 | - protected $dates = ['valid_until']; | |
| 20 | + protected $dates = [ 'valid_until' ]; | |
| 21 | 21 | |
| 22 | - public function __construct(array $attributes = []) | |
| 22 | + public function __construct(array $attributes = [ ]) | |
| 23 | 23 |      { | 
| 24 | 24 |          $this->table = config('doorman.invite_table_name'); | 
| 25 | 25 | parent::__construct($attributes); | 
| @@ -10,9 +10,9 @@ discard block | ||
| 10 | 10 | public function setForAttribute($for) | 
| 11 | 11 |      { | 
| 12 | 12 |          if (is_string($for)) { | 
| 13 | - $this->attributes['for'] = strtolower($for); | |
| 13 | + $this->attributes[ 'for' ] = strtolower($for); | |
| 14 | 14 |          } else { | 
| 15 | - $this->attributes['for'] = null; | |
| 15 | + $this->attributes[ 'for' ] = null; | |
| 16 | 16 | } | 
| 17 | 17 | } | 
| 18 | 18 | |
| @@ -111,10 +111,10 @@ discard block | ||
| 111 | 111 | public function scopeUseless(Builder $query): Builder | 
| 112 | 112 |      { | 
| 113 | 113 | return $query | 
| 114 | -            ->where(function ($q) { | |
| 114 | +            ->where(function($q) { | |
| 115 | 115 | $this->scopeExpired($q); | 
| 116 | 116 | }) | 
| 117 | -            ->orWhere(function ($q) { | |
| 117 | +            ->orWhere(function($q) { | |
| 118 | 118 | $this->scopeFull($q); | 
| 119 | 119 | }); | 
| 120 | 120 | } |