Passed
Push — master ( 09d4f1...0c9b61 )
by Georgi
03:09
created
Dashboard/Database/Migrations/2019_09_18_173148_create_dashboard_tables.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -6,42 +6,42 @@
 block discarded – undo
6 6
 
7 7
 class CreateDashboardTables extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-    	$this->down();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		$this->down();
17 17
     	
18
-    	Schema::create('dashboards', function (Blueprint $table) {
19
-    		$table->increments('id');
20
-    		$table->unsignedInteger('user_id');
21
-            $table->string('name', 64);
22
-            $table->smallInteger('position');
23
-        });
18
+		Schema::create('dashboards', function (Blueprint $table) {
19
+			$table->increments('id');
20
+			$table->unsignedInteger('user_id');
21
+			$table->string('name', 64);
22
+			$table->smallInteger('position');
23
+		});
24 24
 
25
-    	Schema::create('dashboard_applets', function (Blueprint $table) {
26
-    		$table->increments('id');
27
-    		$table->unsignedInteger('dashboard_id');
28
-            $table->string('class', 512);            
29
-            $table->smallInteger('column');
30
-            $table->smallInteger('row');
31
-            $table->text('options');
25
+		Schema::create('dashboard_applets', function (Blueprint $table) {
26
+			$table->increments('id');
27
+			$table->unsignedInteger('dashboard_id');
28
+			$table->string('class', 512);            
29
+			$table->smallInteger('column');
30
+			$table->smallInteger('row');
31
+			$table->text('options');
32 32
             
33
-            $table->foreign('dashboard_id')->references('id')->on('dashboards');
34
-        });
35
-    }
33
+			$table->foreign('dashboard_id')->references('id')->on('dashboards');
34
+		});
35
+	}
36 36
 
37
-    /**
38
-     * Reverse the migrations.
39
-     *
40
-     * @return void
41
-     */
42
-    public function down()
43
-    {
44
-    	Schema::dropIfExists('dashboard_applets');
45
-    	Schema::dropIfExists('dashboards');    	
46
-    }
37
+	/**
38
+	 * Reverse the migrations.
39
+	 *
40
+	 * @return void
41
+	 */
42
+	public function down()
43
+	{
44
+		Schema::dropIfExists('dashboard_applets');
45
+		Schema::dropIfExists('dashboards');    	
46
+	}
47 47
 }
Please login to merge, or discard this patch.
src/Dashboard/DashboardView.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,9 @@  discard block
 block discarded – undo
142 142
 		
143 143
 	public function addMenu()
144 144
 	{
145
-		if ($this->isLocked()) return;
145
+		if ($this->isLocked()) {
146
+			return;
147
+		}
146 148
 		
147 149
 		$dashboardId = $this->dashboard()->id;
148 150
 		
@@ -165,14 +167,18 @@  discard block
 block discarded – undo
165 167
 		$dashboardMenu->addItem([__('Rename dashboard'), 'icon' => 'i cursor'])->on('click', $modal->show());
166 168
 		
167 169
 		// there is only one admin default dashboard
168
-		if ($this->admin) return;
170
+		if ($this->admin) {
171
+			return;
172
+		}
169 173
 		
170 174
 		// ***** add ***** //		
171 175
 		$modal = $this->add(['Modal', 'title' => __('Add Dashboard')])->set(\Closure::fromCallable([$this, 'addDashboard']));
172 176
 		
173 177
 		$dashboardMenu->addItem([__('Add dashboard'), 'icon' => 'add'])->on('click', $modal->show());
174 178
 		
175
-		if ($this->isSingleDashboard()) return;
179
+		if ($this->isSingleDashboard()) {
180
+			return;
181
+		}
176 182
 		
177 183
 		// ***** reorder ***** //
178 184
 		$modal = $this->add(['Modal', 'title' => __('Reorder Dashboards')])->set(\Closure::fromCallable([$this, 'reorderDashboards']));
Please login to merge, or discard this patch.
src/Dashboard/Seeds/Applet.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@
 block discarded – undo
26 26
 		
27 27
 		if ($this->admin) {
28 28
 			$this->set($joint->info())->setAttr('searchkey', strtolower($joint->caption() . ';' . $joint->info()));
29
-		}
30
-		else {
29
+		} else {
31 30
 			if (! $this->locked) {
32 31
 				$this->addControl('close', 'applet-close')->setAttr('title', __('Close applet'));
33 32
 			}
Please login to merge, or discard this patch.
src/Dashboard/DashboardCore.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 	{
32 32
 		// create user default dashboard as copy of the system default
33 33
 		User::created(function(User $user) {
34
-			if (! $defaultDashboard = Dashboard::where('user_id', 0)->first()) return;
34
+			if (! $defaultDashboard = Dashboard::where('user_id', 0)->first()) {
35
+				return;
36
+			}
35 37
 			
36 38
 			$userDefaultDashboard = $defaultDashboard->replicate();
37 39
 			
Please login to merge, or discard this patch.