Completed
Push — master ( 489615...9fed17 )
by Jean-Christophe
03:15
created
Ajax/bootstrap/html/HtmlButtongroups.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @return HtmlButtongroups default : ""
40 40
 	 */
41 41
 	public function setSize($size) {
42
-		foreach ( $this->elements as $element ) {
42
+		foreach ($this->elements as $element) {
43 43
 			$element->setSize($size);
44 44
 		}
45 45
 		if (is_int($size)) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	public function setStyle($value) {
52
-		foreach ( $this->elements as $element )
52
+		foreach ($this->elements as $element)
53 53
 			$element->setStyle($value);
54 54
 	}
55 55
 
@@ -69,25 +69,25 @@  discard block
 block discarded – undo
69 69
 	public function addElement($element) {
70 70
 		$result=$element;
71 71
 		$iid=sizeof($this->elements)+1;
72
-		if (($element instanceof HtmlDropdown)||($element instanceof HtmlSplitbutton)) {
72
+		if (($element instanceof HtmlDropdown) || ($element instanceof HtmlSplitbutton)) {
73 73
 			$this->addExistingDropDown($element);
74 74
 		} elseif (\is_array($element)) {
75
-			$result=$this->_addArrayElement($element,$iid);
75
+			$result=$this->_addArrayElement($element, $iid);
76 76
 		} elseif (is_string($element)) {
77
-			$result=new HtmlButton($this->identifier."-button-".$iid,$element);
77
+			$result=new HtmlButton($this->identifier."-button-".$iid, $element);
78 78
 		}
79
-		if($result instanceof HtmlButton)
79
+		if ($result instanceof HtmlButton)
80 80
 			$this->elements[]=$result;
81 81
 		return $result;
82 82
 	}
83 83
 
84
-	private function _addArrayElement(array $element,int $iid){
84
+	private function _addArrayElement(array $element, int $iid) {
85 85
 		if (array_key_exists("glyph", $element))
86 86
 			$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
87 87
 		elseif (array_key_exists("btnCaption", $element)) {
88 88
 			if (array_key_exists("split", $element))
89 89
 				$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
90
-			else{
90
+			else {
91 91
 				$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
92 92
 				$this->dropdownAsButton($bt);
93 93
 			}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	}
99 99
 
100 100
 	public function addElements($elements) {
101
-		foreach ( $elements as $element ) {
101
+		foreach ($elements as $element) {
102 102
 			$this->addElement($element);
103 103
 		}
104 104
 		return $this;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		} else
119 119
 			$value="btn-group-".$value;
120 120
 		if (strstr($value, "justified")) {
121
-			foreach ( $this->elements as $element ) {
121
+			foreach ($this->elements as $element) {
122 122
 				$element->wrap('<div class="btn-group" role="group">', '</div>');
123 123
 			}
124 124
 		}
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
150 150
 	 */
151 151
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
152
-		foreach ( $this->elements as $element ) {
152
+		foreach ($this->elements as $element) {
153 153
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
154 154
 		}
155 155
 		return $this;
Please login to merge, or discard this patch.