Completed
Push — master ( ee3c3e...979182 )
by Ashley
01:25
created
src/Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/Doorman.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Providers/DoormanServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Models/Invite.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Models/BaseInvite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         'valid_until' => 'datetime'
23 23
     ];
24 24
 
25
-    public function __construct(array $attributes = [])
25
+    public function __construct(array $attributes = [ ])
26 26
     {
27 27
         $this->table = config('doorman.invite_table_name');
28 28
         parent::__construct($attributes);
Please login to merge, or discard this patch.
src/DoormanManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function getDefaultDriver()
30 30
     {
31
-        return $this->container['config']['doorman.driver'];
31
+        return $this->container[ 'config' ][ 'doorman.driver' ];
32 32
     }
33 33
 
34 34
     /**
Please login to merge, or discard this patch.