Passed
Push — master ( 712280...0c3e91 )
by Jean-Christophe
05:57
created
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 			$this->setLabel($label);
20 20
 	}
21 21
 
22
-	public function setChecked($value=true){
23
-		if($value===true){
22
+	public function setChecked($value=true) {
23
+		if ($value===true) {
24 24
 			$this->getField()->setProperty("checked", "checked");
25
-		}else{
25
+		} else {
26 26
 			$this->getField()->removeProperty("checked");
27 27
 		}
28 28
 		return $this;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @return \Ajax\semantic\html\collections\form\AbstractHtmlFormRadioCheckbox
85 85
 	 */
86 86
 	public function attachEvent($selector, $action=NULL) {
87
-		if (isset($action)||\is_numeric($action)===true) {
87
+		if (isset($action) || \is_numeric($action)===true) {
88 88
 			$js='$("#%identifier%").checkbox("attach events", "'.$selector.'", "'.$action.'");';
89 89
 		} else {
90 90
 			$js='$("#%identifier%").checkbox("attach events", "'.$selector.'");';
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function attachEvents($events=array()) {
102 102
 		if (\is_array($events)) {
103
-			foreach ( $events as $action => $selector ) {
103
+			foreach ($events as $action => $selector) {
104 104
 				$this->attachEvent($selector, $action);
105 105
 			}
106 106
 		}
@@ -111,24 +111,24 @@  discard block
 block discarded – undo
111 111
 		return $this->addToProperty("class", "fitted");
112 112
 	}
113 113
 
114
-	public function setOnChecked($jsCode){
114
+	public function setOnChecked($jsCode) {
115 115
 		$this->_params["onChecked"]=$jsCode;
116 116
 		return $this;
117 117
 	}
118 118
 
119
-	public function setOnUnchecked($jsCode){
119
+	public function setOnUnchecked($jsCode) {
120 120
 		$this->_params["onUnchecked"]=$jsCode;
121 121
 		return $this;
122 122
 	}
123 123
 
124
-	public function setOnChange($jsCode){
124
+	public function setOnChange($jsCode) {
125 125
 		$this->_params["onChange"]=$jsCode;
126 126
 		return $this;
127 127
 	}
128 128
 
129 129
 	public function run(JsUtils $js) {
130
-		if(!isset($this->_bsComponent))
131
-			$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
130
+		if (!isset($this->_bsComponent))
131
+			$this->_bsComponent=$js->semantic()->checkbox("#".$this->identifier, $this->_params);
132 132
 		return parent::run($js);
133 133
 	}
134 134
 }
Please login to merge, or discard this patch.
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,14 +15,15 @@  discard block
 block discarded – undo
15 15
 		$field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value);
16 16
 		$field->setProperty("name", $name);
17 17
 		$this->setField($field);
18
-		if (isset($label))
19
-			$this->setLabel($label);
18
+		if (isset($label)) {
19
+					$this->setLabel($label);
20
+		}
20 21
 	}
21 22
 
22 23
 	public function setChecked($value=true){
23 24
 		if($value===true){
24 25
 			$this->getField()->setProperty("checked", "checked");
25
-		}else{
26
+		} else{
26 27
 			$this->getField()->removeProperty("checked");
27 28
 		}
28 29
 		return $this;
@@ -51,8 +52,9 @@  discard block
 block discarded – undo
51 52
 	 * @return mixed
52 53
 	 */
53 54
 	public function getLabel() {
54
-		if (\array_key_exists("label", $this->content))
55
-			return $this->content["label"];
55
+		if (\array_key_exists("label", $this->content)) {
56
+					return $this->content["label"];
57
+		}
56 58
 	}
57 59
 
58 60
 	/**
@@ -127,8 +129,9 @@  discard block
 block discarded – undo
127 129
 	}
128 130
 
129 131
 	public function run(JsUtils $js) {
130
-		if(!isset($this->_bsComponent))
131
-			$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
132
+		if(!isset($this->_bsComponent)) {
133
+					$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
134
+		}
132 135
 		return parent::run($js);
133 136
 	}
134 137
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlTab.php 2 patches
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@  discard block
 block discarded – undo
67 67
 		if($index<$menu->count()){
68 68
 			if(isset($this->content[$index])===false){
69 69
 				$this->content[$index]=$this->createSegment($index, $content, $menu->getItem($index)->getIdentifier());
70
-			}else
71
-				$this->content[$index]->setContent($content);
70
+			} else {
71
+							$this->content[$index]->setContent($content);
72
+			}
72 73
 		}
73 74
 		return $this;
74 75
 	}
@@ -231,15 +232,17 @@  discard block
 block discarded – undo
231 232
 	 * @see BaseHtml::run()
232 233
 	 */
233 234
 	public function run(JsUtils $js) {
234
-		if(isset($this->_bsComponent)===false)
235
-			$this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params);
235
+		if(isset($this->_bsComponent)===false) {
236
+					$this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params);
237
+		}
236 238
 			$this->addEventsOnRun($js);
237 239
 			return $this->_bsComponent;
238 240
 	}
239 241
 
240 242
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
241
-		if($this->content["menu"]->count()>0 && \sizeof($this->content)>1)
242
-			$this->activate(0);
243
+		if($this->content["menu"]->count()>0 && \sizeof($this->content)>1) {
244
+					$this->activate(0);
245
+		}
243 246
 		return parent::compile($js,$view);
244 247
 	}
245 248
 }
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
  * @author jc
15 15
  * @version 1.001
16 16
  */
17
-class HtmlTab extends HtmlSemCollection{
17
+class HtmlTab extends HtmlSemCollection {
18 18
 
19 19
 	protected $params=[];
20 20
 
21
-	public function __construct( $identifier, $tabs=array()){
22
-		parent::__construct( $identifier, "div", "");
21
+	public function __construct($identifier, $tabs=array()) {
22
+		parent::__construct($identifier, "div", "");
23 23
 		$menu=new HtmlMenu("menu".$this->identifier);
24
-		$menu->asTab(false)->setAttachment(NULL,Side::TOP);
24
+		$menu->asTab(false)->setAttachment(NULL, Side::TOP);
25 25
 		$this->content["menu"]=$menu;
26 26
 		$this->addItems($tabs);
27 27
 	}
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
32 32
 	 * @return HtmlSegment
33 33
 	 */
34
-	protected function createItem($value){
34
+	protected function createItem($value) {
35 35
 		$count=$this->count();
36 36
 		$title=$value;
37 37
 		$content=NULL;
38
-		if(\is_array($value)){
39
-			$title=@$value[0];$content=@$value[1];
38
+		if (\is_array($value)) {
39
+			$title=@$value[0]; $content=@$value[1];
40 40
 		}
41 41
 		$menuItem=$this->content["menu"]->addItem($title);
42 42
 		$menuItem->addToProperty("data-tab", $menuItem->getIdentifier());
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 * @param string $datatab
53 53
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
54 54
 	 */
55
-	private function createSegment($count,$content,$datatab){
55
+	private function createSegment($count, $content, $datatab) {
56 56
 		$segment=new HtmlSegment("item-".$this->identifier."-".$count, $content);
57
-		$segment->setAttachment(NULL,Side::BOTTOM)->addToProperty("class", "tab")->addToProperty("data-tab",$datatab);
57
+		$segment->setAttachment(NULL, Side::BOTTOM)->addToProperty("class", "tab")->addToProperty("data-tab", $datatab);
58 58
 		return $segment;
59 59
 	}
60 60
 
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 	 * @param String $content new content
65 65
 	 * @return \Ajax\semantic\html\modules\HtmlTab
66 66
 	 */
67
-	public function setTabContent($index,$content){
67
+	public function setTabContent($index, $content) {
68 68
 		$menu=$this->content["menu"];
69
-		if($index<$menu->count()){
70
-			if(isset($this->content[$index])===false){
69
+		if ($index<$menu->count()) {
70
+			if (isset($this->content[$index])===false) {
71 71
 				$this->content[$index]=$this->createSegment($index, $content, $menu->getItem($index)->getIdentifier());
72
-			}else
72
+			} else
73 73
 				$this->content[$index]->setContent($content);
74 74
 		}
75 75
 		return $this;
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 * @param array $contents
81 81
 	 * @return \Ajax\semantic\html\modules\HtmlTab
82 82
 	 */
83
-	public function setTabsContent($contents){
83
+	public function setTabsContent($contents) {
84 84
 		$size=\sizeof($contents);
85
-		for($i=0;$i<$size;$i++){
85
+		for ($i=0; $i<$size; $i++) {
86 86
 			$this->setTabContent($i, $contents[$i]);
87 87
 		}
88 88
 		return $this;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param int $index
94 94
 	 * @return \Ajax\semantic\html\modules\HtmlTab
95 95
 	 */
96
-	public function activate($index){
96
+	public function activate($index) {
97 97
 		$this->content["menu"]->getItem($index)->setActive(true);
98 98
 		$this->content[$index]->setActive(true);
99 99
 		return $this;
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 	 * @param string $content
106 106
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
107 107
 	 */
108
-	public function addTab($title,$content){
109
-		return $this->addItem([$title,$content]);
108
+	public function addTab($title, $content) {
109
+		return $this->addItem([$title, $content]);
110 110
 	}
111 111
 
112 112
 	/**
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
 	 * @param array $params
121 121
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
122 122
 	 */
123
-	public function forwardTab($index,JsUtils $js,$title,$initialController,$controller,$action,$params=array()){
124
-		if(\array_key_exists($index, $this->content)){
125
-			$this->content[$index]=$js->forward($initialController, $controller, $action,$params);
123
+	public function forwardTab($index, JsUtils $js, $title, $initialController, $controller, $action, $params=array()) {
124
+		if (\array_key_exists($index, $this->content)) {
125
+			$this->content[$index]=$js->forward($initialController, $controller, $action, $params);
126 126
 			return $this->content[$index];
127 127
 		}
128 128
 
129
-		return $this->addAndForwardTab($js, $title, $initialController, $controller, $action,$params);
129
+		return $this->addAndForwardTab($js, $title, $initialController, $controller, $action, $params);
130 130
 	}
131 131
 
132 132
 	/**
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
 	 * @param $params The parameters to pass to the view
140 140
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
141 141
 	 */
142
-	public function renderViewTab($index,JsUtils $js,$title,$initialController, $viewName, $params=array()) {
143
-		if(\array_key_exists($index, $this->content)){
144
-			$this->content[$index]=$js->renderContent($initialController, $viewName,$params);
142
+	public function renderViewTab($index, JsUtils $js, $title, $initialController, $viewName, $params=array()) {
143
+		if (\array_key_exists($index, $this->content)) {
144
+			$this->content[$index]=$js->renderContent($initialController, $viewName, $params);
145 145
 			return $this->content[$index];
146 146
 		}
147
-		return $this->addAndRenderViewTab($js, $title, $initialController, $viewName,$params);
147
+		return $this->addAndRenderViewTab($js, $title, $initialController, $viewName, $params);
148 148
 	}
149 149
 
150 150
 
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 	 * @param array $params
159 159
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
160 160
 	 */
161
-	public function addAndForwardTab(JsUtils $js,$title,$initialController,$controller,$action,$params=array()){
161
+	public function addAndForwardTab(JsUtils $js, $title, $initialController, $controller, $action, $params=array()) {
162 162
 		\ob_start();
163
-		$js->forward($initialController, $controller, $action,$params);
163
+		$js->forward($initialController, $controller, $action, $params);
164 164
 		$content=\ob_get_clean();
165
-		return $this->addTab($title,$content);
165
+		return $this->addTab($title, $content);
166 166
 	}
167 167
 
168 168
 	/**
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
 	 * @param $params The parameters to pass to the view
175 175
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
176 176
 	 */
177
-	public function addAndRenderViewTab(JsUtils $js,$title,$initialController, $viewName, $params=array()) {
178
-		return $this->addTab($title, $js->renderContent($initialController, $viewName,$params));
177
+	public function addAndRenderViewTab(JsUtils $js, $title, $initialController, $viewName, $params=array()) {
178
+		return $this->addTab($title, $js->renderContent($initialController, $viewName, $params));
179 179
 	}
180 180
 
181 181
 	public function setPointing($value=Direction::NONE) {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 * @param int $index
192 192
 	 * @return Ajax\semantic\html\content\HtmlMenuItem
193 193
 	 */
194
-	public function getMenuTab($index){
194
+	public function getMenuTab($index) {
195 195
 		return $this->content["menu"]->getItem($index);
196 196
 	}
197 197
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 * @param int $index
201 201
 	 * @return HtmlSegment
202 202
 	 */
203
-	public function getTab($index){
203
+	public function getTab($index) {
204 204
 		return $this->content[$index];
205 205
 	}
206 206
 
@@ -209,22 +209,22 @@  discard block
 block discarded – undo
209 209
 	 * @param HtmlMenu $menu
210 210
 	 * @return \Ajax\semantic\html\modules\HtmlTab
211 211
 	 */
212
-	public function setMenu($menu){
212
+	public function setMenu($menu) {
213 213
 		$contentSize=\sizeof($this->content);
214
-		for($i=0;$i<$contentSize;$i++){
215
-			if($menu->getItem($i)!==NULL){
216
-				if(isset($this->content[$i])){
217
-					$menu->getItem($i)->addToProperty("data-tab",$this->content[$i]->getProperty("data-tab"));
214
+		for ($i=0; $i<$contentSize; $i++) {
215
+			if ($menu->getItem($i)!==NULL) {
216
+				if (isset($this->content[$i])) {
217
+					$menu->getItem($i)->addToProperty("data-tab", $this->content[$i]->getProperty("data-tab"));
218 218
 				}
219 219
 			}
220 220
 		}
221 221
 		$menuSize=$menu->count();
222
-		for($i=0;$i<$menuSize;$i++){
222
+		for ($i=0; $i<$menuSize; $i++) {
223 223
 			$menu->getItem($i)->removeProperty("href");
224
-			if(isset($this->content[$i])===false){
224
+			if (isset($this->content[$i])===false) {
225 225
 				$this->content[$i]=$this->createSegment($i, "New content", $menu->getItem($i)->getIdentifier());
226 226
 			}
227
-			$menu->getItem($i)->addToProperty("data-tab",$this->content[$i]->getProperty("data-tab"));
227
+			$menu->getItem($i)->addToProperty("data-tab", $this->content[$i]->getProperty("data-tab"));
228 228
 		}
229 229
 
230 230
 		$this->content["menu"]=$menu;
@@ -236,15 +236,15 @@  discard block
 block discarded – undo
236 236
 	 * @see BaseHtml::run()
237 237
 	 */
238 238
 	public function run(JsUtils $js) {
239
-		if(isset($this->_bsComponent)===false)
240
-			$this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params);
239
+		if (isset($this->_bsComponent)===false)
240
+			$this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item", $this->params);
241 241
 			$this->addEventsOnRun($js);
242 242
 			return $this->_bsComponent;
243 243
 	}
244 244
 
245 245
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
246
-		if($this->content["menu"]->count()>0 && \sizeof($this->content)>1)
246
+		if ($this->content["menu"]->count()>0 && \sizeof($this->content)>1)
247 247
 			$this->activate(0);
248
-		return parent::compile($js,$view);
248
+		return parent::compile($js, $view);
249 249
 	}
250 250
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlRating.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	 * @param int $max
14 14
 	 * @param string $icon star or heart
15 15
 	 */
16
-	public function __construct($identifier, $value,$max=5,$icon="") {
16
+	public function __construct($identifier, $value, $max=5, $icon="") {
17 17
 		parent::__construct($identifier, "div", "ui {$icon} rating");
18 18
 		$this->setValue($value);
19 19
 		$this->setMax($max);
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 	 * {@inheritDoc}
24 24
 	 * @see \Ajax\common\html\HtmlDoubleElement::setValue()
25 25
 	 */
26
-	public function setValue($value){
26
+	public function setValue($value) {
27 27
 		$this->setProperty("data-rating", $value);
28 28
 	}
29 29
 
30
-	public function setMax($max){
30
+	public function setMax($max) {
31 31
 		$this->setProperty("data-max-rating", $max);
32 32
 	}
33 33
 
@@ -35,21 +35,21 @@  discard block
 block discarded – undo
35 35
 	 * {@inheritDoc}
36 36
 	 * @see HtmlSemDoubleElement::run()
37 37
 	 */
38
-	public function run(JsUtils $js){
38
+	public function run(JsUtils $js) {
39 39
 		parent::run($js);
40
-		return $js->semantic()->rating("#".$this->identifier,$this->_params);
40
+		return $js->semantic()->rating("#".$this->identifier, $this->_params);
41 41
 	}
42 42
 
43
-	public function asStar(){
43
+	public function asStar() {
44 44
 		return $this->setIcon();
45 45
 	}
46 46
 
47
-	public function asHeart(){
47
+	public function asHeart() {
48 48
 		return $this->setIcon("heart");
49 49
 	}
50 50
 
51
-	public function setIcon($icon="star"){
52
-		return $this->addToPropertyCtrl("class", $icon, ["star","heart",""]);
51
+	public function setIcon($icon="star") {
52
+		return $this->addToPropertyCtrl("class", $icon, ["star", "heart", ""]);
53 53
 	}
54 54
 
55 55
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlShape.php 2 patches
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function getSideContent($index){
54 54
 		$item= $this->getItem($index);
55
-		if(isset($item))
56
-			return $item->getContent();
55
+		if(isset($item)) {
56
+					return $item->getContent();
57
+		}
57 58
 		return null;
58 59
 	}
59 60
 
@@ -147,15 +148,17 @@  discard block
 block discarded – undo
147 148
 	 * @see BaseHtml::run()
148 149
 	 */
149 150
 	public function run(JsUtils $js) {
150
-		if (isset($this->_bsComponent) === false)
151
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
151
+		if (isset($this->_bsComponent) === false) {
152
+					$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
153
+		}
152 154
 		$this->addEventsOnRun($js);
153 155
 		return $this->_bsComponent;
154 156
 	}
155 157
 
156 158
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
157
-		if($this->_autoActive)
158
-			$this->setActiveSide(0);
159
+		if($this->_autoActive) {
160
+					$this->setActiveSide(0);
161
+		}
159 162
 		return parent::compile($js,$view);
160 163
 	}
161 164
 }
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 use Ajax\common\html\BaseHtml;
9 9
 
10 10
 
11
-class HtmlShape extends HtmlSemCollection{
11
+class HtmlShape extends HtmlSemCollection {
12 12
 
13 13
 	protected $_params=array();
14 14
 	protected $_autoActive=true;
15 15
 
16
-	public function __construct( $identifier, $sides){
17
-		parent::__construct( $identifier, "div", "ui shape");
16
+	public function __construct($identifier, $sides) {
17
+		parent::__construct($identifier, "div", "ui shape");
18 18
 		$this->_template='<%tagName% id="%identifier%" %properties%><div class='sides'>%wrapContentBefore%%content%%wrapContentAfter%</div></%tagName%>';
19 19
 		$this->addItems($sides);
20 20
 	}
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	 * {@inheritDoc}
24 24
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
25 25
 	 */
26
-	protected function createItem($value){
27
-		if(\is_object($value)===false){
28
-			$value=new HtmlSemDoubleElement("","div","content",$value);
26
+	protected function createItem($value) {
27
+		if (\is_object($value)===false) {
28
+			$value=new HtmlSemDoubleElement("", "div", "content", $value);
29 29
 		}
30 30
 		return new HtmlShapeItem("side-".$this->identifier."-".$this->count(), $value);
31 31
 	}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * {@inheritDoc}
35 35
 	 * @see \Ajax\common\html\HtmlCollection::createCondition()
36 36
 	 */
37
-	protected function createCondition($value){
37
+	protected function createCondition($value) {
38 38
 		return ($value instanceof HtmlShapeItem)===false;
39 39
 	}
40 40
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @param int $index
43 43
 	 * @return \Ajax\semantic\html\content\HtmlShapeItem
44 44
 	 */
45
-	public function getSide($index){
45
+	public function getSide($index) {
46 46
 		return $this->getItem($index);
47 47
 	}
48 48
 
@@ -50,96 +50,96 @@  discard block
 block discarded – undo
50 50
 	 * @param int $index
51 51
 	 * @return mixed|NULL
52 52
 	 */
53
-	public function getSideContent($index){
54
-		$item= $this->getItem($index);
55
-		if(isset($item))
53
+	public function getSideContent($index) {
54
+		$item=$this->getItem($index);
55
+		if (isset($item))
56 56
 			return $item->getContent();
57 57
 		return null;
58 58
 	}
59 59
 
60
-	public function jsDo($action){
60
+	public function jsDo($action) {
61 61
 		return "$('#".$this->identifier."').shape('".$action."');";
62 62
 	}
63 63
 
64
-	public function jsFlipLeft(){
64
+	public function jsFlipLeft() {
65 65
 		return $this->jsDo("flip left");
66 66
 	}
67 67
 
68
-	public function jsFlipRight(){
68
+	public function jsFlipRight() {
69 69
 		return $this->jsDo("flip right");
70 70
 	}
71 71
 
72
-	public function jsFlipUp(){
72
+	public function jsFlipUp() {
73 73
 		return $this->jsDo("flip up");
74 74
 	}
75 75
 
76
-	public function jsFlipDown(){
76
+	public function jsFlipDown() {
77 77
 		return $this->jsDo("flip down");
78 78
 	}
79 79
 
80
-	public function jsFlipOver(){
80
+	public function jsFlipOver() {
81 81
 		return $this->jsDo("flip over");
82 82
 	}
83 83
 
84
-	public function jsFlipBack(){
84
+	public function jsFlipBack() {
85 85
 		return $this->jsDo("flip back");
86 86
 	}
87 87
 
88
-	private function doActionOn($element,$event,$what){
89
-		if($element instanceof BaseHtml){
90
-			return $element->on($event, $what,true,true);
88
+	private function doActionOn($element, $event, $what) {
89
+		if ($element instanceof BaseHtml) {
90
+			return $element->on($event, $what, true, true);
91 91
 		}
92 92
 	}
93 93
 
94
-	public function flipLeftOn($element,$event){
94
+	public function flipLeftOn($element, $event) {
95 95
 		return $this->doActionOn($element, $event, $this->jsFlipLeft());
96 96
 	}
97 97
 
98
-	public function flipRightOn($element,$event){
98
+	public function flipRightOn($element, $event) {
99 99
 		return $this->doActionOn($element, $event, $this->jsFlipRight());
100 100
 	}
101 101
 
102
-	public function flipUpOn($element,$event){
102
+	public function flipUpOn($element, $event) {
103 103
 		return $this->doActionOn($element, $event, $this->jsFlipUp());
104 104
 	}
105 105
 
106
-	public function flipDownOn($element,$event){
106
+	public function flipDownOn($element, $event) {
107 107
 		return $this->doActionOn($element, $event, $this->jsFlipDown());
108 108
 	}
109 109
 
110
-	public function flipBackOn($element,$event){
110
+	public function flipBackOn($element, $event) {
111 111
 		return $this->doActionOn($element, $event, $this->jsFlipBack());
112 112
 	}
113 113
 
114
-	public function flipOverOn($element,$event){
114
+	public function flipOverOn($element, $event) {
115 115
 		return $this->doActionOn($element, $event, $this->jsFlipOver());
116 116
 	}
117 117
 
118
-	public function setActiveSide($index){
118
+	public function setActiveSide($index) {
119 119
 		$side=$this->getSide($index);
120
-		if(isset($side)){
120
+		if (isset($side)) {
121 121
 			$side->setActive(true);
122 122
 		}
123 123
 		return $this;
124 124
 	}
125 125
 
126
-	public function asCube(){
126
+	public function asCube() {
127 127
 		return $this->addToPropertyCtrl("class", "cube", ["cube"]);
128 128
 	}
129 129
 
130
-	public function asText(){
130
+	public function asText() {
131 131
 		return $this->addToPropertyCtrl("class", "text", ["text"]);
132 132
 	}
133 133
 
134
-	public function setWidth($width="initial"){
134
+	public function setWidth($width="initial") {
135 135
 		$this->_params["width"]=$width;
136 136
 	}
137
-	public function onChange($jsCode){
138
-		return $this->_params["onChange"]="%function(){" . $jsCode . "}%";
137
+	public function onChange($jsCode) {
138
+		return $this->_params["onChange"]="%function(){".$jsCode."}%";
139 139
 	}
140 140
 
141
-	public function beforeChange($jsCode){
142
-		return $this->_params["beforeChange"]="%function(){" . $jsCode . "}%";
141
+	public function beforeChange($jsCode) {
142
+		return $this->_params["beforeChange"]="%function(){".$jsCode."}%";
143 143
 	}
144 144
 
145 145
 	/*
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
 	 * @see BaseHtml::run()
148 148
 	 */
149 149
 	public function run(JsUtils $js) {
150
-		if (isset($this->_bsComponent) === false)
151
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
150
+		if (isset($this->_bsComponent)===false)
151
+			$this->_bsComponent=$js->semantic()->shape("#".$this->identifier, $this->_params);
152 152
 		$this->addEventsOnRun($js);
153 153
 		return $this->_bsComponent;
154 154
 	}
155 155
 
156 156
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
157
-		if($this->_autoActive)
157
+		if ($this->_autoActive)
158 158
 			$this->setActiveSide(0);
159
-		return parent::compile($js,$view);
159
+		return parent::compile($js, $view);
160 160
 	}
161 161
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/SegmentType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class SegmentType extends BaseEnum {
8
-	const RAISED="raised",STACKED="stacked",PILED="piled",NORMAL="";
8
+	const RAISED="raised", STACKED="stacked", PILED="piled", NORMAL="";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Side.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class Side extends BaseEnum {
8
-	const BOTTOM="bottom",BOTH="",TOP="top";
8
+	const BOTTOM="bottom", BOTH="", TOP="top";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Wide.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Ajax\semantic\html\base\constants;
3 3
 	use Ajax\common\BaseEnum;
4 4
 abstract class Wide extends BaseEnum {
5
-	const W1="one", W2="two", W3="three", W4="four",W5="five", W6="six", W7="seven", W8="eight",W9="nine",W10="ten",W11="eleven",W12="twelve",W13="thirteen",W14="fourteen",W15="fifteen",W16="sixteen";
5
+	const W1="one", W2="two", W3="three", W4="four", W5="five", W6="six", W7="seven", W8="eight", W9="nine", W10="ten", W11="eleven", W12="twelve", W13="thirteen", W14="fourteen", W15="fifteen", W16="sixteen";
6 6
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/VerticalAlignment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 class VerticalAlignment extends BaseEnum {
8
-	const TOP="top",MIDDLE="middle",BOTTOM="bottom";
8
+	const TOP="top", MIDDLE="middle", BOTTOM="bottom";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Style.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class Style extends BaseEnum {
8
-	const INFO="info",SUCCESS="success",POSITIVE="positive",WARNING="warning",ERROR="error",NEGATIVE="negative";
8
+	const INFO="info", SUCCESS="success", POSITIVE="positive", WARNING="warning", ERROR="error", NEGATIVE="negative";
9 9
 }
Please login to merge, or discard this patch.