Passed
Push — main ( 0bfc82...b73123 )
by Garbuz
02:45
created
src/Repositories/GlobalTokenRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function deleteGlobalTokenById(int $token_id): bool
44 44
     {
45
-        return (bool)GlobalToken::where('id', $token_id)->delete();
45
+        return (bool) GlobalToken::where('id', $token_id)->delete();
46 46
     }
47 47
 
48 48
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function deleteGlobalToken(string $token): bool
56 56
     {
57
-        return (bool)GlobalToken::where('token', $token)->delete();
57
+        return (bool) GlobalToken::where('token', $token)->delete();
58 58
     }
59 59
 
60 60
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function deactivationGlobalTokenById(int $token_id): bool
79 79
     {
80
-        return (bool)GlobalToken::where('id', $token_id)->update([
80
+        return (bool) GlobalToken::where('id', $token_id)->update([
81 81
             'expiration' => Carbon::now()->subMinutes(),
82 82
         ]);
83 83
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function deactivationGlobalToken(string $token): bool
93 93
     {
94
-        return (bool)GlobalToken::where('token', $token)->update([
94
+        return (bool) GlobalToken::where('token', $token)->update([
95 95
             'expiration' => Carbon::now()->subMinutes(),
96 96
         ]);
97 97
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function prolongationGlobalTokenById(int $token_id, ?DateTime $expiration = null): bool
108 108
     {
109
-        return (bool)GlobalToken::where('id', $token_id)->update(['expiration' => $expiration]);
109
+        return (bool) GlobalToken::where('id', $token_id)->update(['expiration' => $expiration]);
110 110
     }
111 111
 
112 112
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public function prolongationGlobalToken(string $token, ?DateTime $expiration = null): bool
121 121
     {
122
-        return (bool)GlobalToken::where('token', $token)->update(['expiration' => $expiration]);
122
+        return (bool) GlobalToken::where('token', $token)->update(['expiration' => $expiration]);
123 123
     }
124 124
 
125 125
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function setLastUseGlobalToken(int $token_id): bool
157 157
     {
158
-        return (bool)GlobalToken::where('id', $token_id)->update([
158
+        return (bool) GlobalToken::where('id', $token_id)->update([
159 159
             'last_use' => Carbon::now()->subMinutes(),
160 160
         ]);
161 161
     }
Please login to merge, or discard this patch.
src/Repositories/AccessTokenRepository.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function deleteAccessTokenById(int $token_id): bool
52 52
     {
53
-        return (bool)AccessToken::where('id', $token_id)->delete();
53
+        return (bool) AccessToken::where('id', $token_id)->delete();
54 54
     }
55 55
 
56 56
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function deleteAccessToken(string $token): bool
64 64
     {
65
-        return (bool)AccessToken::where('token', $token)->delete();
65
+        return (bool) AccessToken::where('token', $token)->delete();
66 66
     }
67 67
 
68 68
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function deleteAccessTokenByUser(int $user_id, string $user_type): bool
77 77
     {
78
-        return (bool)AccessToken::where('user_id', $user_id)->where('user_type', $user_type)->delete();
78
+        return (bool) AccessToken::where('user_id', $user_id)->where('user_type', $user_type)->delete();
79 79
     }
80 80
 
81 81
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function deactivationAccessTokenById(int $token_id): bool
100 100
     {
101
-        return (bool)AccessToken::where('id', $token_id)->update([
101
+        return (bool) AccessToken::where('id', $token_id)->update([
102 102
             'expiration' => Carbon::now()->subMinutes(),
103 103
         ]);
104 104
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function deactivationAccessToken(string $token): bool
114 114
     {
115
-        return (bool)AccessToken::where('token', $token)->update([
115
+        return (bool) AccessToken::where('token', $token)->update([
116 116
             'expiration' => Carbon::now()->subMinutes(),
117 117
         ]);
118 118
     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function deactivationAccessTokenByUser(int $user_id, string $user_type): bool
129 129
     {
130
-        return (bool)AccessToken::where('user_id', $user_id)
130
+        return (bool) AccessToken::where('user_id', $user_id)
131 131
             ->where('user_type', $user_type)
132 132
             ->update([
133 133
                 'expiration' => Carbon::now()->subMinutes(),
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function prolongationAccessTokenById(int $token_id, ?DateTime $expiration = null): bool
146 146
     {
147
-        return (bool)AccessToken::where('id', $token_id)->update(['expiration' => $expiration]);
147
+        return (bool) AccessToken::where('id', $token_id)->update(['expiration' => $expiration]);
148 148
     }
149 149
 
150 150
     /**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function prolongationAccessToken(string $token, ?DateTime $expiration = null): bool
159 159
     {
160
-        return (bool)AccessToken::where('token', $token)->update(['expiration' => $expiration]);
160
+        return (bool) AccessToken::where('token', $token)->update(['expiration' => $expiration]);
161 161
     }
162 162
 
163 163
     /**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function prolongationAccessTokenByUser(int $user_id, string $user_type, ?DateTime $expiration = null): bool
173 173
     {
174
-        return (bool)AccessToken::where('user_id', $user_id)
174
+        return (bool) AccessToken::where('user_id', $user_id)
175 175
             ->where('user_type', $user_type)
176 176
             ->update(['expiration' => $expiration]);
177 177
     }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function setLastUseAccessToken(int $token_id): bool
226 226
     {
227
-        return (bool)AccessToken::where('id', $token_id)->update([
227
+        return (bool) AccessToken::where('id', $token_id)->update([
228 228
             'last_use' => Carbon::now()->subMinutes(),
229 229
         ]);
230 230
     }
Please login to merge, or discard this patch.
src/Commands/CreateTokenCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             return 1;
74 74
         }
75 75
         $date = is_null($expiration) ? 'навсегда' : 'до ' . $expiration->format('Y-m-d H:i:s');
76
-        $this->line('Персональный токен ' . $token->token . ' создан '. $date . '.');
76
+        $this->line('Персональный токен ' . $token->token . ' создан ' . $date . '.');
77 77
         return 1;
78 78
     }
79 79
 }
Please login to merge, or discard this patch.
src/Commands/CreateGlobalTokenCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $expiration = $day > 0 ? Carbon::now()->addDays($day) : null;
66 66
         $token = $this->TokenManager->createGlobalToken($title, $expiration);
67 67
         $date = is_null($expiration) ? 'навсегда' : 'до ' . $expiration->format('Y-m-d H:i:s');
68
-        $this->line('Глобальный токен ' . $token->token . ' создан '. $date . '.');
68
+        $this->line('Глобальный токен ' . $token->token . ' создан ' . $date . '.');
69 69
         return 1;
70 70
     }
71 71
 }
Please login to merge, or discard this patch.