Completed
Push — master ( 042f42...691772 )
by Jean-Christophe
03:21
created
Ajax/common/html/PropertyWrapper.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 	private static function containsElement($input) {
27 27
 		foreach ( $input as $v ) {
28
-			if (\is_object($v) || \is_array($v))
29
-				return true;
28
+			if (\is_object($v) || \is_array($v)) {
29
+							return true;
30
+			}
30 31
 		}
31 32
 		return false;
32 33
 	}
@@ -44,12 +45,13 @@  discard block
 block discarded – undo
44 45
 
45 46
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46 47
 		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
47
-			if (is_object($v))
48
-				return $v->compile($js);
49
-			elseif (\is_array($v)) {
48
+			if (is_object($v)) {
49
+							return $v->compile($js);
50
+			} elseif (\is_array($v)) {
50 51
 				return self::wrap($v, $js, $separator, $valueQuote);
51
-			} else
52
-				return $v;
52
+			} else {
53
+							return $v;
54
+			}
53 55
 		}, $input));
54 56
 	}
55 57
 }
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlInputgroup.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -28,10 +28,11 @@  discard block
 block discarded – undo
28 28
 		$this->setProperty("aria-describedby", $id);
29 29
 		$span->setContent($text);
30 30
 		$span->setClass("input-group-addon");
31
-		if (strtolower($position)==="left")
32
-			$this->addonLeft=$span;
33
-		else
34
-			$this->addonRight=$span;
31
+		if (strtolower($position)==="left") {
32
+					$this->addonLeft=$span;
33
+		} else {
34
+					$this->addonRight=$span;
35
+		}
35 36
 		return $span;
36 37
 	}
37 38
 
@@ -74,7 +75,7 @@  discard block
 block discarded – undo
74 75
 			$bt=NULL;
75 76
 			if(is_string($item)){
76 77
 				$bt=new HtmlButton($this->identifier."-bt-".$i++,$item);
77
-			}elseif ($item instanceof HtmlButton){
78
+			} elseif ($item instanceof HtmlButton){
78 79
 				$bt=$item;
79 80
 			}
80 81
 			if(isset($bt)){
@@ -88,10 +89,11 @@  discard block
 block discarded – undo
88 89
 		$dropdown->setBtnCaption($caption);
89 90
 		$dropdown->fromArray($items);
90 91
 
91
-		if (strtolower($position)==="left")
92
-			$this->addonLeft=$dropdown;
93
-		else
94
-			$this->addonRight=$dropdown;
92
+		if (strtolower($position)==="left") {
93
+					$this->addonLeft=$dropdown;
94
+		} else {
95
+					$this->addonRight=$dropdown;
96
+		}
95 97
 		return $dropdown;
96 98
 	}
97 99
 
@@ -126,10 +128,12 @@  discard block
 block discarded – undo
126 128
 
127 129
 	public function run(JsUtils $js) {
128 130
 		parent::run($js);
129
-		if (isset($this->addonLeft))
130
-			$this->addonLeft->run($js);
131
-		if (isset($this->addonRight))
132
-			$this->addonRight->run($js);
131
+		if (isset($this->addonLeft)) {
132
+					$this->addonLeft->run($js);
133
+		}
134
+		if (isset($this->addonRight)) {
135
+					$this->addonRight->run($js);
136
+		}
133 137
 	}
134 138
 
135 139
 }
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
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	public function getPanel($index) {
72
-		if ($index<sizeof($this->content))
73
-			return $this->content [$index];
72
+		if ($index<sizeof($this->content)) {
73
+					return $this->content [$index];
74
+		}
74 75
 	}
75 76
 }
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlPanel.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,8 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @return \Ajax\bootstrap\html\HtmlPanel default : "panel-default"
90 90
 	 */
91 91
 	public function setStyle($cssStyle) {
92
-		if (!PhalconUtils::startsWith($cssStyle, "panel"))
93
-			$cssStyle="panel".$cssStyle;
92
+		if (!PhalconUtils::startsWith($cssStyle, "panel")) {
93
+					$cssStyle="panel".$cssStyle;
94
+		}
94 95
 		return $this->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("panel"));
95 96
 	}
96 97
 
@@ -132,7 +133,8 @@  discard block
 block discarded – undo
132 133
 	 * @return $this default : false
133 134
 	 */
134 135
 	public function show($value) {
135
-		if ($this->_collapsable)
136
-			$this->_showOnStartup=$value;
136
+		if ($this->_collapsable) {
137
+					$this->_showOnStartup=$value;
138
+		}
137 139
 	}
138 140
 }
Please login to merge, or discard this patch.
Ajax/bootstrap/html/phalcon/PhBsForm.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,16 +30,18 @@
 block discarded – undo
30 30
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
31 31
 		$result="";
32 32
 		foreach ( $this->_elements as $element ) {
33
-			if ($element instanceof PhBsElement)
34
-				$result.=$element->compile($js, $view);
33
+			if ($element instanceof PhBsElement) {
34
+							$result.=$element->compile($js, $view);
35
+			}
35 36
 		}
36 37
 		return $result;
37 38
 	}
38 39
 
39 40
 	public function run(JsUtils $js) {
40 41
 		foreach ( $this->_elements as $element ) {
41
-			if ($element instanceof PhBsElement)
42
-				$element->run($js);
42
+			if ($element instanceof PhBsElement) {
43
+							$element->run($js);
44
+			}
43 45
 		}
44 46
 	}
45 47
 }
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
@@ -36,8 +36,9 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	public function getTab($index) {
39
-		if ($index>0&&$index<sizeof($this->tabs))
40
-			return $this->tabs [$index];
39
+		if ($index>0&&$index<sizeof($this->tabs)) {
40
+					return $this->tabs [$index];
41
+		}
41 42
 	}
42 43
 
43 44
 	public function show($index) {
@@ -53,8 +54,9 @@  discard block
 block discarded – undo
53 54
 	 */
54 55
 	public function onShow($index, $jsCode) {
55 56
 		$tab=$this->getTab($index);
56
-		if (isset($tab))
57
-			return $tab->onShow($jsCode);
57
+		if (isset($tab)) {
58
+					return $tab->onShow($jsCode);
59
+		}
58 60
 	}
59 61
 
60 62
 	/**
@@ -65,8 +67,9 @@  discard block
 block discarded – undo
65 67
 	 */
66 68
 	public function onShown($index, $jsCode) {
67 69
 		$tab=$this->getTab($index);
68
-		if (isset($tab))
69
-			return $tab->onShown($jsCode);
70
+		if (isset($tab)) {
71
+					return $tab->onShown($jsCode);
72
+		}
70 73
 	}
71 74
 
72 75
 	/**
@@ -77,8 +80,9 @@  discard block
 block discarded – undo
77 80
 	 */
78 81
 	public function onHide($index, $jsCode) {
79 82
 		$tab=$this->getTab($index);
80
-		if (isset($tab))
81
-			return $tab->onShow($jsCode);
83
+		if (isset($tab)) {
84
+					return $tab->onShow($jsCode);
85
+		}
82 86
 	}
83 87
 
84 88
 	/**
@@ -89,7 +93,8 @@  discard block
 block discarded – undo
89 93
 	 */
90 94
 	public function onHidden($index, $jsCode) {
91 95
 		$tab=$this->getTab($index);
92
-		if (isset($tab))
93
-			return $tab->onShow($jsCode);
96
+		if (isset($tab)) {
97
+					return $tab->onShow($jsCode);
98
+		}
94 99
 	}
95 100
 }
Please login to merge, or discard this patch.