Passed
Push — main ( 12e7e2...8f14aa )
by Garbuz
03:18
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(string $token): bool
157 157
     {
158
-        return (bool)GlobalToken::where('token', $token)->update([
158
+        return (bool) GlobalToken::where('token', $token)->update([
159 159
             'last_use' => Carbon::now()->subMinutes(),
160 160
         ]);
161 161
     }
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,14 +88,14 @@
 block discarded – undo
88 88
      */
89 89
     public function load(): Config
90 90
     {
91
-        $this->encryption = (bool)config($this->configName . '.encryption', $this->encryption);
92
-        $this->autoClear = (bool)config($this->configName . '.auto_clear', $this->autoClear);
91
+        $this->encryption = (bool) config($this->configName . '.encryption', $this->encryption);
92
+        $this->autoClear = (bool) config($this->configName . '.auto_clear', $this->autoClear);
93 93
         $this->autoClearPause = intval(config($this->configName . '.auto_clear_pause', $this->autoClearPause));
94
-        $this->repository_global = (string)config($this->configName . '.repository_global', $this->repository_global);
95
-        $this->repository_access = (string)config($this->configName . '.repository_global', $this->repository_access);
96
-        $this->lastUse = (bool)config($this->configName . '.last_use', $this->lastUse);
97
-        $this->jwt = (bool)config($this->configName . '.jwt', $this->jwt);
98
-        $this->salt = (string)config($this->configName . '.salt', $this->salt);
94
+        $this->repository_global = (string) config($this->configName . '.repository_global', $this->repository_global);
95
+        $this->repository_access = (string) config($this->configName . '.repository_global', $this->repository_access);
96
+        $this->lastUse = (bool) config($this->configName . '.last_use', $this->lastUse);
97
+        $this->jwt = (bool) config($this->configName . '.jwt', $this->jwt);
98
+        $this->salt = (string) config($this->configName . '.salt', $this->salt);
99 99
         $this->salt = file_exists($this->salt) ? file_get_contents($this->salt) : $this->salt;
100 100
         return $this;
101 101
     }
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function register()
61 61
     {
62
-        $this->app->singleton(Config::class, function () {
62
+        $this->app->singleton(Config::class, function() {
63 63
             return new Config;
64 64
         });
65 65
         $this->app->bind(
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             GlobalTokenRepositoryInterface::class,
71 71
             app(Config::class)->getRepositoryGlobalToken()
72 72
         );
73
-        $this->app->singleton(TokenManager::class, function () {
73
+        $this->app->singleton(TokenManager::class, function() {
74 74
             return new TokenManager(
75 75
                 app(Config::class),
76 76
                 app(AccessTokenRepositoryInterface::class),
Please login to merge, or discard this patch.