Passed
Push — master ( 347b45...ffee8a )
by Georgi
02:42
created
src/Layout/Seeds/ActionBar.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
 	protected function prepareButtons()
61 61
 	{
62
-		foreach (self::$buttons->sortByDesc(function ($button) {
62
+		foreach (self::$buttons->sortByDesc(function($button) {
63 63
 			return $button->weight;
64 64
 		}) as $button) {
65 65
 			$this->add($button);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	
84 84
 	public static function addButtons($buttons)
85 85
 	{
86
-		foreach (is_array($buttons)? $buttons: [$buttons] as $button) {
86
+		foreach (is_array($buttons) ? $buttons : [$buttons] as $button) {
87 87
 			self::addButton($button);
88 88
 		}
89 89
 	}
Please login to merge, or discard this patch.
src/Layout/Seeds/NavMenu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 		$this->addHeader($this->app->title);
18 18
 		
19 19
 		$items = collect();
20
-		foreach(NavMenuJoint::collect() as $joint) {
20
+		foreach (NavMenuJoint::collect() as $joint) {
21 21
 			$items = $items->merge($joint->items());
22 22
 		}
23 23
 
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 	
35 35
 	public static function addItems($menu, Collection $items)
36 36
 	{
37
-		$items->sort(function ($entry1, $entry2) {
37
+		$items->sort(function($entry1, $entry2) {
38 38
 			$weight1 = $entry1['weight']?? 10;
39 39
 			$weight2 = $entry2['weight']?? 10;
40 40
 			
41 41
 			return $weight1 <=> $weight2;
42 42
 		})->map(function($item, $caption) use ($menu) {
43
-			if (! ($item['access']?? true)) return;
43
+			if (!($item['access']?? true)) return;
44 44
 			
45 45
 			if (!isset($item['link']) && !is_array($item)) {
46 46
 				$item = [
Please login to merge, or discard this patch.
src/Layout/LayoutView.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class LayoutView extends ModuleView
32 32
 {
33
-    public $menuLeft;    // vertical menu
34
-    public $menu;        // horizontal menu
35
-    public $menuRight;   // vertical pull-down
33
+    public $menuLeft; // vertical menu
34
+    public $menu; // horizontal menu
35
+    public $menuRight; // vertical pull-down
36 36
     public $actionBar;   
37 37
     public $locationBar;
38 38
     
39
-    public $burger = true;      // burger menu item
39
+    public $burger = true; // burger menu item
40 40
 
41 41
     /*
42 42
      * Whether or not left Menu is visible on Page load.
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
         }
88 88
        	
89 89
 		// home icon
90
-		$this->menu->addItem(['class' => ['icon epesi-home']], url('view/dashboard'))->add(['Icon',	'home']);
90
+		$this->menu->addItem(['class' => ['icon epesi-home']], url('view/dashboard'))->add(['Icon', 'home']);
91 91
 
92 92
 		// location bar
93
-		$this->locationBar = $this->menu->add(['View',	['ui' => 'epesi-location']]);
93
+		$this->locationBar = $this->menu->add(['View', ['ui' => 'epesi-location']]);
94 94
 	}
95 95
 
96 96
 	public function setLocation($crumbs)
@@ -132,20 +132,20 @@  discard block
 block discarded – undo
132 132
         
133 133
         $this->menuLeft = $this->add(new Seeds\NavMenu('left vertical labeled sidebar'), 'LeftMenu');
134 134
 
135
-        if (! $this->burger) return;
135
+        if (!$this->burger) return;
136 136
 
137
-        if (! session()->get('menu', 1)) {
137
+        if (!session()->get('menu', 1)) {
138 138
         	$this->isMenuLeftVisible = false;
139 139
         }
140 140
         
141
-        $this->burger->add(['Icon',	'content'])->on('click', [
141
+        $this->burger->add(['Icon', 'content'])->on('click', [
142 142
         		(new jQuery('.ui.left.sidebar'))->toggleClass('visible'),
143 143
         		(new jQuery('.epesi-logo'))->toggleClass('expanded'),
144 144
         		(new jQuery('body'))->toggleClass('atk-leftMenu-visible'),
145 145
         		$this->burger->add('jsCallback')->set(function($j, $visible) {
146
-        			session()->put('menu', $visible? 1: 0);
146
+        			session()->put('menu', $visible ? 1 : 0);
147 147
         			session()->save();
148
-        		}, [new \atk4\ui\jsExpression( '$("#' . $this->menuLeft->id . '").hasClass("visible")? 1: 0' )])
148
+        		}, [new \atk4\ui\jsExpression('$("#' . $this->menuLeft->id . '").hasClass("visible")? 1: 0')])
149 149
         ]);
150 150
     }
151 151
     
Please login to merge, or discard this patch.
src/Dashboard/Seeds/Applet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 			$this->set($joint->info())->setAttr('searchkey', strtolower($joint->caption() . ';' . $joint->info()));
29 29
 		}
30 30
 		else {
31
-			if (! $this->locked) {
31
+			if (!$this->locked) {
32 32
 				$this->addControl('close', 'applet-close')->setAttr('title', __('Close applet'));
33 33
 			}
34 34
 			
Please login to merge, or discard this patch.
src/Dashboard/Integration/DashboardNavMenu.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 		}
23 23
 
24 24
 		return [
25
-				__('DASHBOARD') => count($ret) > 1? [
25
+				__('DASHBOARD') => count($ret) > 1 ? [
26 26
 						'access' => true,
27 27
 						'group' => $ret,
28 28
 						'weight' => -10000
29
-				]: array_merge(reset($ret), ['weight' => -10000]),
29
+				] : array_merge(reset($ret), ['weight' => -10000]),
30 30
 		];
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.