Passed
Push — master ( a28dc5...770320 )
by Neerav
07:05
created
src/Support/BladeDirectives.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
      */
14 14
     public static function register()
15 15
     {
16
-        Blade::if('role', function ($role) {
16
+        Blade::if ('role', function($role) {
17 17
             return auth()->check() && auth()->user()->hasRole($role);
18 18
         });
19 19
 
20
-        Blade::if('anyrole', function ($roles) {
20
+        Blade::if ('anyrole', function($roles) {
21 21
             return auth()->check() && auth()->user()->hasAnyRole(explode('|', $roles));
22 22
         });
23 23
     }
Please login to merge, or discard this patch.
src/Rakshak.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         Route::namespace('\Thinkstudeo\Rakshak\Http\Controllers')
50 50
             ->middleware(['web', 'auth'])
51 51
             ->prefix(config('rakshak.route_prefix'))
52
-            ->group(function () {
52
+            ->group(function() {
53 53
                 Route::get('login/2fa', 'TwoFactorController@showOtpForm')->name('rakshak.2fa.show');
54 54
                 Route::post('login/2fa/verify', 'TwoFactorController@verifyOtp')->name('rakshak.2fa.verify');
55 55
 
Please login to merge, or discard this patch.
src/Middleware/CheckRole.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
      */
17 17
     public function handle($request, \Closure $next, $role)
18 18
     {
19
-        if (! $request->user()) {
19
+        if (!$request->user()) {
20 20
             return redirect(route('login'));
21 21
         }
22 22
 
23 23
         $roles = is_string($role) ? explode('|', $role) : $role;
24 24
 
25
-        if (! $request->user()->hasAnyRole($roles)) {
25
+        if (!$request->user()->hasAnyRole($roles)) {
26 26
             abort(Response::HTTP_FORBIDDEN, 'You do not have the permission.');
27 27
         }
28 28
 
Please login to merge, or discard this patch.
src/Console/InstallCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     protected function exportRoutes()
60 60
     {
61 61
         if (
62
-            ! Str::contains(file_get_contents(base_path('routes/web.php')), 'Auth::routes') ||
62
+            !Str::contains(file_get_contents(base_path('routes/web.php')), 'Auth::routes') ||
63 63
             $this->option('force')
64 64
         ) {
65 65
             file_put_contents(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     protected function makeControllers()
90 90
     {
91 91
         foreach ($this->controllers as $key => $value) {
92
-            if (! file_exists(app_path($value)) || $this->option('force')) {
92
+            if (!file_exists(app_path($value)) || $this->option('force')) {
93 93
                 file_put_contents(
94 94
                     app_path($value),
95 95
                     $this->compileStub(__DIR__."/stubs/controllers/{$key}")
@@ -119,15 +119,15 @@  discard block
 block discarded – undo
119 119
      */
120 120
     protected function createDirectories()
121 121
     {
122
-        if (! is_dir($directory = resource_path('views/layouts'))) {
122
+        if (!is_dir($directory = resource_path('views/layouts'))) {
123 123
             mkdir($directory, 0755, true);
124 124
         }
125 125
 
126
-        if (! is_dir($directory = resource_path('views/auth/passwords'))) {
126
+        if (!is_dir($directory = resource_path('views/auth/passwords'))) {
127 127
             mkdir($directory, 0755, true);
128 128
         }
129 129
 
130
-        if (! is_dir($directory = app_path('Notifications/Rakshak'))) {
130
+        if (!is_dir($directory = app_path('Notifications/Rakshak'))) {
131 131
             mkdir($directory, 0755, true);
132 132
         }
133 133
     }
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
     protected function exportViews()
156 156
     {
157 157
         foreach ($this->views as $key => $value) {
158
-            if (file_exists($view = resource_path('views/'.$value)) && ! $this->option('force')) {
159
-                if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) {
158
+            if (file_exists($view = resource_path('views/'.$value)) && !$this->option('force')) {
159
+                if (!$this->confirm("The [{$value}] view already exists. Do you want to replace it?")) {
160 160
                     continue;
161 161
                 }
162 162
             }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $filename = str_replace('stub', 'php', basename($stub));
182 182
             $path = app_path("Notifications/Rakshak/{$filename}");
183 183
 
184
-            if (! file_exists($path) || $this->option('force')) {
184
+            if (!file_exists($path) || $this->option('force')) {
185 185
                 file_put_contents(
186 186
                     $path,
187 187
                     $this->compileStub($stub->getPathname())
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             config('auth.providers.users.model')
205 205
         ), '\\');
206 206
         if (
207
-            ! str_contains(file_get_contents(app_path('User.php')), 'HasRakshak') ||
207
+            !str_contains(file_get_contents(app_path('User.php')), 'HasRakshak') ||
208 208
             $this->option('force')
209 209
         ) {
210 210
             file_put_contents(
Please login to merge, or discard this patch.
src/Traits/UuidAsPrimaryKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public static function bootUuidAsPrimaryKey(): void
16 16
     {
17
-        static::creating(function ($model) {
17
+        static::creating(function($model) {
18 18
             $model->{$model->getKeyName()} = Str::orderedUuid()->toString();
19 19
         });
20 20
     }
Please login to merge, or discard this patch.
src/RakshakServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     protected function mergeConfig(): void
71 71
     {
72
-        if (! $this->app->configurationIsCached()) {
72
+        if (!$this->app->configurationIsCached()) {
73 73
             $this->mergeConfigFrom(__DIR__.'/../config/rakshak.php', 'rakshak');
74 74
         }
75 75
     }
Please login to merge, or discard this patch.