Passed
Push — master ( d88b3b...8c1d75 )
by Prateek
09:11 queued 10s
created
src/Commands/Initialize.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function handle()
26 26
     {
27
-        copy(__DIR__ . '/../../src/resources/stubs/RouteServiceProvider.stub', app_path('Providers/LaragenRouteServiceProvider.php'));
27
+        copy(__DIR__.'/../../src/resources/stubs/RouteServiceProvider.stub', app_path('Providers/LaragenRouteServiceProvider.php'));
28 28
         if (!is_dir('routes/backend')) {
29 29
             try {
30 30
                 mkdir(base_path('routes/backend'), 0777, true);
31 31
             } catch (\Exception $e) {
32 32
                 exit("Couldn't make directory. Make sure you have right permissions.");
33 33
             }
34
-            copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/backend/web.php'));
35
-            copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/backend/auth.php'));
34
+            copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/backend/web.php'));
35
+            copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/backend/auth.php'));
36 36
         }
37 37
         if (!is_dir('routes/frontend')) {
38 38
             try {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             } catch (\Exception $e) {
41 41
                 exit("Couldn't make directory. Make sure you have right permissions.");
42 42
             }
43
-            copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/frontend/web.php'));
43
+            copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/frontend/web.php'));
44 44
         }
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/Generators/Backend/View.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@
 block discarded – undo
43 43
         $this->insertIntoFile(
44 44
             $mainMenuFile,
45 45
             '{{-- Main Menu --}}',
46
-			"\n".'<li class="nav-item dropdown">
46
+            "\n".'<li class="nav-item dropdown">
47 47
                     <a href="#" class="nav-link has-dropdown" data-toggle="dropdown"><i class="fas fa-columns"></i> <span> '.Str::plural($this->module->getModelName()).' </span></a>
48 48
                     <ul class="dropdown-menu">
49 49
                         <li><a class="nav-link" href="{{ route("backend.'.$this->module->getModuleName().'.create") }}"> Add new '.Str::plural($this->module->getModelName()).'</a></li>
50 50
                         <li><a class="nav-link" href="{{ route("backend.'.$this->module->getModuleName().'.index") }}">All '.Str::plural($this->module->getModelName()).'</a></li>
51 51
                     </ul>
52 52
                 </li>'
53
-		);
53
+        );
54 54
         return $this->generatedFiles;
55 55
     }
56 56
 
Please login to merge, or discard this patch.
src/Generators/Backend/Notification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 class Notification extends BaseGenerator implements GeneratorInterface
10 10
 {
11 11
     private static $destination = "laragen/app/Notifications";
12
-    private static $namespace  = "Laragen\App\Notifications";
12
+    private static $namespace = "Laragen\App\Notifications";
13 13
     private static $template = "backend/notifications/notification";
14 14
 
15 15
     public function generate()
Please login to merge, or discard this patch.
src/Generators/Common/Seeder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
             $this->insertIntoFile(
211 211
                 $laragenSeederFile,
212 212
                 "\n        // End factories",
213
-                "\n".$this->getTabs(2)."factory(".$type->getPivot()."::class, " . ((int) config('laragen.options.seed_rows') * 2) . ")->create();",
213
+                "\n".$this->getTabs(2)."factory(".$type->getPivot()."::class, ".((int) config('laragen.options.seed_rows') * 2).")->create();",
214 214
                 false
215 215
             );
216 216
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,9 @@
 block discarded – undo
146 146
         $foreignData = "";
147 147
 
148 148
         foreach ($types as $type) {
149
-            if ($type->hasSelfParent()) continue;
149
+            if ($type->hasSelfParent()) {
150
+                continue;
151
+            }
150 152
             $foreignData .= $this->buildTemplate('common/Factories/fragments/options', [
151 153
                 '{{parent}}'      => $type->getColumnKey(),
152 154
                 '{{parentModel}}' => $type->getRelatedModel()
Please login to merge, or discard this patch.
src/Models/Module.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@
 block discarded – undo
44 44
             $data = new TypeResolver($this->name, $column, $typeOptions);
45 45
             $type = $data->getLaragenType();
46 46
             $this->columnsData[$column] = $type;
47
-            if ($type->isDisplay())
48
-                $this->displayColumns[] = $type;
47
+            if ($type->isDisplay()) {
48
+                            $this->displayColumns[] = $type;
49
+            }
49 50
         }
50 51
 
51 52
         if (sizeof($this->displayColumns) == 0) {
Please login to merge, or discard this patch.
src/resources/database/migrations/2019_01_01_000000_alter_users_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::table('users', function (Blueprint $table) {
11
+        Schema::table('users', function(Blueprint $table) {
12 12
             $table->string('api_token', 60)->unique()->nullable();
13 13
         });
14 14
     }
15 15
 
16 16
     public function down()
17 17
     {
18
-        Schema::table('users', function (Blueprint $table) {
18
+        Schema::table('users', function(Blueprint $table) {
19 19
             $table->dropColumn(['api_token']);
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
src/resources/app/Http/Controllers/Backend/RoleController.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
     public function __construct()
14 14
     {
15 15
         $this->middleware(function($request, $next) {
16
-            if (!auth()->user()->getRoleNames()->contains('super-admin'))
17
-                abort(403, 'Access denied');
16
+            if (!auth()->user()->getRoleNames()->contains('super-admin')) {
17
+                            abort(403, 'Access denied');
18
+            }
18 19
             return $next($request);
19 20
         });
20 21
 
@@ -44,8 +45,9 @@  discard block
 block discarded – undo
44 45
                 return $perm;
45 46
             })->groupBy(function($perm) { 
46 47
                 foreach (array_keys(app('laragen')->getModules()) as $module) {
47
-                    if (Str::contains($perm->name, str_replace('_', ' ', $module)))
48
-                        return Str::title(str_replace('_', ' ', $module));
48
+                    if (Str::contains($perm->name, str_replace('_', ' ', $module))) {
49
+                                            return Str::title(str_replace('_', ' ', $module));
50
+                    }
49 51
                 }
50 52
                 return "Others";
51 53
             }),
@@ -63,8 +65,9 @@  discard block
 block discarded – undo
63 65
                 return $perm;
64 66
             })->groupBy(function($perm) { 
65 67
                 foreach (array_keys(app('laragen')->getModules()) as $module) {
66
-                    if (Str::contains($perm->name, str_replace('_', ' ', $module)))
67
-                        return Str::title(str_replace('_', ' ', $module));
68
+                    if (Str::contains($perm->name, str_replace('_', ' ', $module))) {
69
+                                            return Str::title(str_replace('_', ' ', $module));
70
+                    }
68 71
                 }
69 72
                 return "Others";
70 73
             }),
Please login to merge, or discard this patch.
src/resources/app/Http/Middleware/Authenticate.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
     protected function redirectTo($request)
16 16
     {
17
-        if (! $request->expectsJson()) {
17
+        if (!$request->expectsJson()) {
18 18
             return route('backend.login');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
config/options.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         'xs' => '200x200',
32 32
     ],
33 33
     'events'	=> [
34
-        'created','updated','deleted'
34
+        'created', 'updated', 'deleted'
35 35
     ],
36 36
     'seed_rows' => 25,
37 37
     'listing_per_page' => 20,
Please login to merge, or discard this patch.