Passed
Push — main ( c388bf...5a9537 )
by Garbuz
02:50
created
src/Repositories/AccessTokenRepository.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function deleteAccessTokenById(int $token_id): bool
53 53
     {
54
-        return (bool)AccessToken::where('id', $token_id)->delete();
54
+        return (bool) AccessToken::where('id', $token_id)->delete();
55 55
     }
56 56
 
57 57
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function deleteAccessToken(string $token): bool
65 65
     {
66
-        return (bool)AccessToken::where('token', $token)->delete();
66
+        return (bool) AccessToken::where('token', $token)->delete();
67 67
     }
68 68
 
69 69
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function deleteAccessTokenByUser(int $user_id, string $user_type): bool
78 78
     {
79
-        return (bool)AccessToken::where('user_id', $user_id)->where('user_type', $user_type)->delete();
79
+        return (bool) AccessToken::where('user_id', $user_id)->where('user_type', $user_type)->delete();
80 80
     }
81 81
 
82 82
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function deactivationAccessTokenById(int $token_id): bool
101 101
     {
102
-        return (bool)AccessToken::where('id', $token_id)->update([
102
+        return (bool) AccessToken::where('id', $token_id)->update([
103 103
             'expiration' => Carbon::now()->subMinutes(),
104 104
         ]);
105 105
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function deactivationAccessToken(string $token): bool
115 115
     {
116
-        return (bool)AccessToken::where('token', $token)->update([
116
+        return (bool) AccessToken::where('token', $token)->update([
117 117
             'expiration' => Carbon::now()->subMinutes(),
118 118
         ]);
119 119
     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function deactivationAccessTokenByUser(int $user_id, string $user_type): bool
130 130
     {
131
-        return (bool)AccessToken::where('user_id', $user_id)
131
+        return (bool) AccessToken::where('user_id', $user_id)
132 132
             ->where('user_type', $user_type)
133 133
             ->update([
134 134
                 'expiration' => Carbon::now()->subMinutes(),
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function prolongationAccessTokenById(int $token_id, ?DateTime $expiration = null): bool
147 147
     {
148
-        return (bool)AccessToken::where('id', $token_id)->update(['expiration' => $expiration]);
148
+        return (bool) AccessToken::where('id', $token_id)->update(['expiration' => $expiration]);
149 149
     }
150 150
 
151 151
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function prolongationAccessToken(string $token, ?DateTime $expiration = null): bool
160 160
     {
161
-        return (bool)AccessToken::where('token', $token)->update(['expiration' => $expiration]);
161
+        return (bool) AccessToken::where('token', $token)->update(['expiration' => $expiration]);
162 162
     }
163 163
 
164 164
     /**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function prolongationAccessTokenByUser(int $user_id, string $user_type, ?DateTime $expiration = null): bool
174 174
     {
175
-        return (bool)AccessToken::where('user_id', $user_id)
175
+        return (bool) AccessToken::where('user_id', $user_id)
176 176
             ->where('user_type', $user_type)
177 177
             ->update(['expiration' => $expiration]);
178 178
     }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         string   $user_type,
198 198
         string   $token
199 199
     ): bool {
200
-        return (bool)AccessToken::where('id', $token_id)->update([
200
+        return (bool) AccessToken::where('id', $token_id)->update([
201 201
             'token'      => $token,
202 202
             'user_id'    => $user_id,
203 203
             'user_type'  => $user_type,
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      */
255 255
     public function setLastUseAccessToken(string $token): bool
256 256
     {
257
-        return (bool)AccessToken::where('token', $token)->update([
257
+        return (bool) AccessToken::where('token', $token)->update([
258 258
             'last_use' => Carbon::now()->subMinutes(),
259 259
         ]);
260 260
     }
Please login to merge, or discard this patch.