Passed
Push — master ( 61cc62...67a7e6 )
by Iman
04:30
created
src/CBCoreModule/middlewares/CBBackend.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     private function guardView($request)
61 61
     {
62
-        if ($request->is($this->url.'*') && ! CRUDBooster::canView()) {
62
+        if ($request->is($this->url.'*') && !CRUDBooster::canView()) {
63 63
             $this->stopIllegalAction('view');
64 64
         }
65 65
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     private function guardCreate($request)
71 71
     {
72
-        if ($request->is($this->url.'/add*') && ! CRUDBooster::canCreate()) {
72
+        if ($request->is($this->url.'/add*') && !CRUDBooster::canCreate()) {
73 73
             $this->stopIllegalAction('add');
74 74
         }
75 75
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     private function guardUpdate($request)
81 81
     {
82
-        if ($request->is($this->url.'/edit*') && ! CRUDBooster::canUpdate()) {
82
+        if ($request->is($this->url.'/edit*') && !CRUDBooster::canUpdate()) {
83 83
             $this->stopIllegalAction('edit');
84 84
         }
85 85
     }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     private function guardDelete($request)
91 91
     {
92
-        if ($request->is($this->url.'/delete*') && ! CRUDBooster::canDelete()) {
92
+        if ($request->is($this->url.'/delete*') && !CRUDBooster::canDelete()) {
93 93
             $this->stopIllegalAction('delete');
94 94
         }
95 95
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     private function guardRead($request)
101 101
     {
102
-        if ($request->is($this->url.'/detail*') && ! CRUDBooster::canRead()) {
102
+        if ($request->is($this->url.'/detail*') && !CRUDBooster::canRead()) {
103 103
             $this->stopIllegalAction('view');
104 104
         }
105 105
     }
Please login to merge, or discard this patch.
src/Modules/ApiGeneratorModule/CBAuthAPIMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
      */
117 117
     private function tokenMissMatchDevice($senderToken, $userAgent, $serverToken)
118 118
     {
119
-        if (! Cache::has($senderToken) || Cache::get($senderToken) == $userAgent) {
119
+        if (!Cache::has($senderToken) || Cache::get($senderToken) == $userAgent) {
120 120
             return;
121 121
         }
122 122
         $result = [
Please login to merge, or discard this patch.
src/Modules/AuthModule/AuthController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 
83 83
     private function validateForgotPass()
84 84
     {
85
-        $validator = Validator::make(request()->all(), ['email' => 'required|email|exists:cms_users',]);
85
+        $validator = Validator::make(request()->all(), ['email' => 'required|email|exists:cms_users', ]);
86 86
 
87 87
         if ($validator->fails()) {
88 88
             $message = $validator->errors()->all();
Please login to merge, or discard this patch.
src/Modules/PrivilegeModule/AdminPrivilegesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         foreach (Request::input('privileges', []) as $moduleId => $data) {
100 100
             //Check Menu
101 101
 
102
-            $arrs = array_get_keys($data, ['can_see_module', 'can_create', 'can_read', 'can_edit', 'can_delete',], 0);
102
+            $arrs = array_get_keys($data, ['can_see_module', 'can_create', 'can_read', 'can_edit', 'can_delete', ], 0);
103 103
             $this->savePermissions($id, $moduleId, $arrs);
104 104
         }
105 105
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $this->col[] = [
181 181
             'label' => 'Superadmin',
182 182
             'name' => 'is_superadmin',
183
-            'callback' => function ($row) {
183
+            'callback' => function($row) {
184 184
                 return ($row->is_superadmin) ? "<span class='label label-success'>Superadmin</span>" : "<span class='label label-default'>Standard</span>";
185 185
             },
186 186
         ];
Please login to merge, or discard this patch.
src/Modules/StatisticModule/statistic_route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
     'middleware' => ['web', \crocodicstudio\crudbooster\CBCoreModule\middlewares\CBSuperadmin::class],
5 5
     'prefix' => cbAdminPath(),
6 6
     'namespace' => cbModulesNS('StatisticModule'),
7
-], function () {
7
+], function() {
8 8
     Route::get('statistic-builder/', 'AdminStatisticBuilderController@getIndex')->name('AdminStatisticBuilderControllerGetIndex');
9 9
     Route::get('statistic-builder/show-dashboard', 'AdminStatisticBuilderController@getShowDashboard')->name('AdminStatisticBuilderControllerGetShowDashboard');
10 10
     Route::get('statistic-builder/show', 'AdminStatisticBuilderController@getShow')->name('AdminStatisticBuilderControllerGetShow');
Please login to merge, or discard this patch.
src/Modules/PrivilegeModule/PrivilegeHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
     {
105 105
         $uid = auth('cbAdmin')->user()->id_cms_privileges;
106 106
 
107
-        return cache()->rememberForever('cb_admin_privileges_roles', function () use ($uid) {
107
+        return cache()->rememberForever('cb_admin_privileges_roles', function() use ($uid) {
108 108
             return \DB::table('cms_privileges_roles')->where('id_cms_privileges', $uid)->join('cms_modules', 'cms_modules.id', '=', 'id_cms_modules')->select('cms_modules.name', 'cms_modules.path', 'can_see_module', 'can_create', 'can_read', 'can_edit', 'can_delete')->get() ?: [];
109 109
         });
110 110
     }
Please login to merge, or discard this patch.
migrations/2018_03_05_052641_create_cms_privileges_roles_table.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -5,36 +5,36 @@
 block discarded – undo
5 5
 
6 6
 class CreateCmsPrivilegesRolesTable extends Migration {
7 7
 
8
-	/**
9
-	 * Run the migrations.
10
-	 *
11
-	 * @return void
12
-	 */
13
-	public function up()
14
-	{
15
-		Schema::create('cms_privileges_roles', function(Blueprint $table)
16
-		{
17
-			$table->increments('id');
18
-			$table->boolean('can_see_module')->nullable();
19
-			$table->boolean('can_create')->nullable();
20
-			$table->boolean('can_read')->nullable();
21
-			$table->boolean('can_edit')->nullable();
22
-			$table->boolean('can_delete')->nullable();
23
-			$table->integer('id_cms_privileges')->nullable();
24
-			$table->integer('id_cms_modules')->nullable();
25
-			$table->timestamps();
26
-		});
27
-	}
8
+    /**
9
+     * Run the migrations.
10
+     *
11
+     * @return void
12
+     */
13
+    public function up()
14
+    {
15
+        Schema::create('cms_privileges_roles', function(Blueprint $table)
16
+        {
17
+            $table->increments('id');
18
+            $table->boolean('can_see_module')->nullable();
19
+            $table->boolean('can_create')->nullable();
20
+            $table->boolean('can_read')->nullable();
21
+            $table->boolean('can_edit')->nullable();
22
+            $table->boolean('can_delete')->nullable();
23
+            $table->integer('id_cms_privileges')->nullable();
24
+            $table->integer('id_cms_modules')->nullable();
25
+            $table->timestamps();
26
+        });
27
+    }
28 28
 
29 29
 
30
-	/**
31
-	 * Reverse the migrations.
32
-	 *
33
-	 * @return void
34
-	 */
35
-	public function down()
36
-	{
37
-		Schema::drop('cms_privileges_roles');
38
-	}
30
+    /**
31
+     * Reverse the migrations.
32
+     *
33
+     * @return void
34
+     */
35
+    public function down()
36
+    {
37
+        Schema::drop('cms_privileges_roles');
38
+    }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
src/CBCoreModule/Installer/InstallationCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         $printer->printHeader();
36 36
 
37
-        if (! ((new RequirementChecker($this))->check())) {
37
+        if (!((new RequirementChecker($this))->check())) {
38 38
             $this->info('Sorry unfortunately your system is not meet with our requirements !');
39 39
             $printer->printFooter(false);
40 40
             $this->info('--');
Please login to merge, or discard this patch.
migrations/2018_03_05_052641_create_cms_apicustom_table.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -5,42 +5,42 @@
 block discarded – undo
5 5
 
6 6
 class CreateCmsApicustomTable extends Migration {
7 7
 
8
-	/**
9
-	 * Run the migrations.
10
-	 *
11
-	 * @return void
12
-	 */
13
-	public function up()
14
-	{
15
-		Schema::create('cms_apicustom', function(Blueprint $table)
16
-		{
17
-			$table->increments('id');
18
-			$table->string('permalink')->nullable();
19
-			$table->string('tabel', 50)->nullable();
20
-			$table->string('aksi')->nullable();
21
-			$table->string('kolom', 50)->nullable();
22
-			$table->string('orderby')->nullable();
23
-			$table->string('sub_query_1')->nullable();
24
-			$table->string('sql_where')->nullable();
25
-			$table->string('name')->nullable();
26
-			$table->string('keterangan')->nullable();
27
-			$table->string('parameter')->nullable();
28
-			$table->timestamps();
29
-			$table->string('method_type', 25)->nullable();
30
-			$table->text('parameters')->nullable();
31
-			$table->text('responses')->nullable();
32
-		});
33
-	}
8
+    /**
9
+     * Run the migrations.
10
+     *
11
+     * @return void
12
+     */
13
+    public function up()
14
+    {
15
+        Schema::create('cms_apicustom', function(Blueprint $table)
16
+        {
17
+            $table->increments('id');
18
+            $table->string('permalink')->nullable();
19
+            $table->string('tabel', 50)->nullable();
20
+            $table->string('aksi')->nullable();
21
+            $table->string('kolom', 50)->nullable();
22
+            $table->string('orderby')->nullable();
23
+            $table->string('sub_query_1')->nullable();
24
+            $table->string('sql_where')->nullable();
25
+            $table->string('name')->nullable();
26
+            $table->string('keterangan')->nullable();
27
+            $table->string('parameter')->nullable();
28
+            $table->timestamps();
29
+            $table->string('method_type', 25)->nullable();
30
+            $table->text('parameters')->nullable();
31
+            $table->text('responses')->nullable();
32
+        });
33
+    }
34 34
 
35 35
 
36
-	/**
37
-	 * Reverse the migrations.
38
-	 *
39
-	 * @return void
40
-	 */
41
-	public function down()
42
-	{
43
-		Schema::drop('cms_apicustom');
44
-	}
36
+    /**
37
+     * Reverse the migrations.
38
+     *
39
+     * @return void
40
+     */
41
+    public function down()
42
+    {
43
+        Schema::drop('cms_apicustom');
44
+    }
45 45
 
46 46
 }
Please login to merge, or discard this patch.