Completed
Push — master ( 85f0a8...b535d8 )
by Jean-Christophe
9s
created
Ajax/bootstrap/html/base/PropertyWrapper.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Ajax\bootstrap\html\base;
4 4
 
5 5
 use Ajax\service\JArray;
6
-use Ajax\service\AjaxCall;
7 6
 
8 7
 class PropertyWrapper {
9 8
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@
 block discarded – undo
17 17
 				$value1=reset($input);
18 18
 				if (is_object($value1)) {
19 19
 					$output=PropertyWrapper::wrapObjects($input, $js, $separator=' ');
20
-				} else
21
-					$output=PropertyWrapper::wrapStrings($input, $separator=' ', $valueQuote='"');
20
+				} else {
21
+									$output=PropertyWrapper::wrapStrings($input, $separator=' ', $valueQuote='"');
22
+				}
22 23
 			}
23 24
 		}
24 25
 		return $output;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlModal.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Phalcon\Mvc\View;
6 6
 use Ajax\JsUtils;
7 7
 use Ajax\bootstrap\html\base\BaseHtml;
8
-use Phalcon\Mvc\Dispatcher;
9 8
 use Phalcon\Mvc\Controller;
10 9
 
11 10
 /**
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -151,18 +151,20 @@  discard block
 block discarded – undo
151 151
 		$this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array (
152 152
 				"show" => $this->showOnStartup
153 153
 		));
154
-		if ($this->draggable)
155
-			$this->_bsComponent->setDraggable(true);
154
+		if ($this->draggable) {
155
+					$this->_bsComponent->setDraggable(true);
156
+		}
156 157
 		$this->_bsComponent->setBackdrop($this->backdrop);
157 158
 		$this->addEventsOnRun($js);
158 159
 		return $this->_bsComponent;
159 160
 	}
160 161
 
161 162
 	public function getButton($index) {
162
-		if (is_int($index))
163
-			return $this->buttons [$index];
164
-		else
165
-			return $this->getElementById($index, $this->buttons);
163
+		if (is_int($index)) {
164
+					return $this->buttons [$index];
165
+		} else {
166
+					return $this->getElementById($index, $this->buttons);
167
+		}
166 168
 	}
167 169
 
168 170
 	public function showOnCreate() {
@@ -188,8 +190,9 @@  discard block
 block discarded – undo
188 190
 
189 191
 	public function jsHideButton($index) {
190 192
 		$btn=$this->getButton($index);
191
-		if ($btn)
192
-			return "$('#".$btn->getIdentifier()."').hide();";
193
+		if ($btn) {
194
+					return "$('#".$btn->getIdentifier()."').hide();";
195
+		}
193 196
 	}
194 197
 
195 198
 	/**
Please login to merge, or discard this patch.
Ajax/bootstrap/html/phalcon/PhBsSelect.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ajax\bootstrap\html\phalcon\PhBsElement;
6 6
 use Phalcon\Forms\Element\Select;
7
-use Ajax\bootstrap\html\base\HtmlDoubleElement;
8 7
 use Ajax\bootstrap\html\html5\HtmlSelect;
9 8
 
10 9
 class PhBsSelect extends PhBsElement {
Please login to merge, or discard this patch.
Ajax/JsUtils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@
 block discarded – undo
45 45
 
46 46
 	protected function _setDi($di) {
47 47
 		$this->_di=$di;
48
-		if ($this->js!=null&&$di!=null)
49
-			$this->js->setDi($di);
48
+		if ($this->js!=null&&$di!=null) {
49
+					$this->js->setDi($di);
50
+		}
50 51
 	}
51 52
 
52 53
 	/**
Please login to merge, or discard this patch.
Ajax/bootstrap/components/Tabs.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@  discard block
 block discarded – undo
35 35
 	}
36 36
 
37 37
 	public function getTab($index) {
38
-		if ($index>0&&$index<sizeof($this->tabs))
39
-			return $this->tabs [$index];
38
+		if ($index>0&&$index<sizeof($this->tabs)) {
39
+					return $this->tabs [$index];
40
+		}
40 41
 	}
41 42
 
42 43
 	public function show($index) {
@@ -52,8 +53,9 @@  discard block
 block discarded – undo
52 53
 	 */
53 54
 	public function onShow($index, $jsCode) {
54 55
 		$tab=$this->getTab($index);
55
-		if (isset($tab))
56
-			return $tab->onShow($jsCode);
56
+		if (isset($tab)) {
57
+					return $tab->onShow($jsCode);
58
+		}
57 59
 	}
58 60
 
59 61
 	/**
@@ -64,8 +66,9 @@  discard block
 block discarded – undo
64 66
 	 */
65 67
 	public function onShown($index, $jsCode) {
66 68
 		$tab=$this->getTab($index);
67
-		if (isset($tab))
68
-			return $tab->onShown($jsCode);
69
+		if (isset($tab)) {
70
+					return $tab->onShown($jsCode);
71
+		}
69 72
 	}
70 73
 
71 74
 	/**
@@ -76,8 +79,9 @@  discard block
 block discarded – undo
76 79
 	 */
77 80
 	public function onHide($index, $jsCode) {
78 81
 		$tab=$this->getTab($index);
79
-		if (isset($tab))
80
-			return $tab->onShow($jsCode);
82
+		if (isset($tab)) {
83
+					return $tab->onShow($jsCode);
84
+		}
81 85
 	}
82 86
 
83 87
 	/**
@@ -88,7 +92,8 @@  discard block
 block discarded – undo
88 92
 	 */
89 93
 	public function onHidden($index, $jsCode) {
90 94
 		$tab=$this->getTab($index);
91
-		if (isset($tab))
92
-			return $tab->onShow($jsCode);
95
+		if (isset($tab)) {
96
+					return $tab->onShow($jsCode);
97
+		}
93 98
 	}
94 99
 }
95 100
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlAccordion.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
 	}
78 78
 
79 79
 	public function getPanel($index) {
80
-		if ($index<sizeof($this->content))
81
-			return $this->content [$index];
80
+		if ($index<sizeof($this->content)) {
81
+					return $this->content [$index];
82
+		}
82 83
 	}
83 84
 }
84 85
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlBreadcrumbs.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 		if(is_array($element)){
68 68
 			$elm=new HtmlLink("lnk-".$this->identifier."-".$size);
69 69
 			$elm->fromArray($element);
70
-		}else if($element instanceof HtmlLink){
70
+		} else if($element instanceof HtmlLink){
71 71
 			$elm=$element;
72
-		}else{
72
+		} else{
73 73
 			$elm=new HtmlLink("lnk-".$this->identifier."-".$size,$href,$element);
74 74
 			if(isset($glyph)){
75 75
 				$elm->wrapContentWithGlyph($glyph);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		}
117 117
 		if($this->absolutePaths===true){
118 118
 			return $this->_hrefFunction($this->content[$index]);
119
-		}else{
119
+		} else{
120 120
 			return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),0,$index+1));
121 121
 		}
122 122
 	}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtongroups.php 1 patch
Braces   +20 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 
46 46
 	public function setStyle($value) {
47
-		foreach ( $this->elements as $element )
48
-			$element->setStyle($value);
47
+		foreach ( $this->elements as $element ) {
48
+					$element->setStyle($value);
49
+		}
49 50
 	}
50 51
 
51 52
 	private function dropdownAsButton($bt) {
@@ -70,16 +71,18 @@  discard block
 block discarded – undo
70 71
 		} elseif ($element instanceof HtmlButton) {
71 72
 			$this->elements[]=$element;
72 73
 		} elseif (is_array($element)) {
73
-			if (array_key_exists("glyph", $element))
74
-				$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
75
-			elseif (array_key_exists("btnCaption", $element)) {
76
-				if (array_key_exists("split", $element))
77
-					$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
78
-				else
79
-					$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
74
+			if (array_key_exists("glyph", $element)) {
75
+							$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
76
+			} elseif (array_key_exists("btnCaption", $element)) {
77
+				if (array_key_exists("split", $element)) {
78
+									$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
79
+				} else {
80
+									$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
81
+				}
80 82
 				$this->dropdownAsButton($bt);
81
-			} else
82
-				$bt=new HtmlButton($this->identifier."-button-".$iid);
83
+			} else {
84
+							$bt=new HtmlButton($this->identifier."-button-".$iid);
85
+			}
83 86
 			$bt->fromArray($element);
84 87
 			$this->elements[]=$bt;
85 88
 			$result=$bt;
@@ -110,8 +113,9 @@  discard block
 block discarded – undo
110 113
 	public function setAlignment($value) {
111 114
 		if (is_int($value)) {
112 115
 			$value=CssRef::alignment("btn-group")[$value];
113
-		} else
114
-			$value="btn-group-".$value;
116
+		} else {
117
+					$value="btn-group-".$value;
118
+		}
115 119
 		if (strstr($value, "justified")) {
116 120
 			foreach ( $this->elements as $element ) {
117 121
 				$element->wrap('<div class="btn-group" role="group">', '</div>');
@@ -126,9 +130,9 @@  discard block
 block discarded – undo
126 130
 	 * @return HtmlButton
127 131
 	 */
128 132
 	public function getElement($index) {
129
-		if (is_int($index))
130
-			return $this->elements[$index];
131
-		else {
133
+		if (is_int($index)) {
134
+					return $this->elements[$index];
135
+		} else {
132 136
 			$elm=$this->getElementById($index, $this->elements);
133 137
 			return $elm;
134 138
 		}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtontoolbar.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	private function getLastButtonGroup() {
47 47
 		$nb=sizeof($this->elements);
48
-		if ($nb>0)
49
-			$bg=$this->elements [$nb-1];
50
-		else {
48
+		if ($nb>0) {
49
+					$bg=$this->elements [$nb-1];
50
+		} else {
51 51
 			$bg=new HtmlButtongroups($this->identifier."-buttongroups-".$nb);
52 52
 			$this->elements []=$bg;
53 53
 		}
@@ -65,8 +65,9 @@  discard block
 block discarded – undo
65 65
 	public function getLastGroup() {
66 66
 		$bg=null;
67 67
 		$nb=sizeof($this->elements);
68
-		if ($nb>0)
69
-			$bg=$this->elements [$nb-1];
68
+		if ($nb>0) {
69
+					$bg=$this->elements [$nb-1];
70
+		}
70 71
 		return $bg;
71 72
 	}
72 73
 
Please login to merge, or discard this patch.