Completed
Push — master ( b77ba2...042f42 )
by Jean-Christophe
03:22
created
Ajax/bootstrap/html/content/HtmlNavzone.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		parent::__construct($identifier);
28 28
 		$this->tagName="ul";
29 29
 		$this->_template='<%tagName% id="%identifier%" class="nav navbar-nav %class%">%elements%</%tagName%>';
30
-		$this->elements=array ();
30
+		$this->elements=array();
31 31
 	}
32 32
 
33 33
 	public function setClass($value) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	}
40 40
 
41 41
 	public function addElement($element) {
42
-		if($element instanceof HtmlLink){
42
+		if ($element instanceof HtmlLink) {
43 43
 			$this->addLink($element);
44 44
 		} else if (is_object($element)) {
45 45
 			$this->elements []=$element;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 	public function addElements($elements) {
61 61
 		if (\is_array($elements)) {
62
-			foreach ( $elements as $key => $element ) {
62
+			foreach ($elements as $key => $element) {
63 63
 				$iid=$this->getElementsCount()+1;
64 64
 				if ($element instanceof HtmlDropdownItem)
65 65
 					$this->elements []=$element;
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	public function addLink($caption, $href="#") {
88 88
 		$iid=$this->getElementsCount()+1;
89 89
 		$li=new HtmlBsDoubleElement($this->identifier."-li-".$iid, "li");
90
-		if($caption instanceof HtmlLink){
90
+		if ($caption instanceof HtmlLink) {
91 91
 			$link=$caption;
92
-		}else{
92
+		} else {
93 93
 			$link=new HtmlLink($this->identifier."-link-".$iid, $href, $caption);
94 94
 		}
95 95
 		$li->setContent($link);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	}
123 123
 
124 124
 	public function run(JsUtils $js) {
125
-		foreach ( $this->elements as $element ) {
125
+		foreach ($this->elements as $element) {
126 126
 			$element->run($js);
127 127
 		}
128 128
 	}
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @param int $index
144 144
 	 * @return BaseHtml
145 145
 	 */
146
-	public function getElement($index){
146
+	public function getElement($index) {
147 147
 		return $this->elements[$index];
148 148
 	}
149 149
 }
150 150
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/php/yii/JsUtils.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 
5 5
 use yii\helpers\Url;
6 6
 
7
-class JsUtils extends \Ajax\JsUtils{
8
-	public function getUrl($url){
9
-		if($url==="")
7
+class JsUtils extends \Ajax\JsUtils {
8
+	public function getUrl($url) {
9
+		if ($url==="")
10 10
 			$url="/";
11 11
 		return Url::toRoute($url);
12 12
 	}
13 13
 
14
-	public function addViewElement($identifier,$content,&$view){
14
+	public function addViewElement($identifier, $content, &$view) {
15 15
 		$params=$view->params;
16 16
 		if (\array_key_exists("q", $params)===false) {
17 17
 			$view->params["q"]=array();
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 		$view->params["q"][$identifier]=$content;
20 20
 	}
21 21
 
22
-	public function createScriptVariable(&$view,$view_var, $output){
22
+	public function createScriptVariable(&$view, $view_var, $output) {
23 23
 		$view->params[$view_var]=$output;
24 24
 	}
25 25
 
26
-	public function forward($initialControllerInstance,$controllerName,$actionName,$params=array()){
26
+	public function forward($initialControllerInstance, $controllerName, $actionName, $params=array()) {
27 27
 		\ob_start();
28 28
 		$ctrInfo=\yii::$app->createController($controllerName."/".$actionName);
29 29
 		$ctrInfo[0]->{$ctrInfo[1]}($params);
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 		return $result;
33 33
 	}
34 34
 
35
-	public function renderContent($initialControllerInstance,$viewName, $params=NULL) {
36
-		return \yii::$app->view->render($viewName,$params);
35
+	public function renderContent($initialControllerInstance, $viewName, $params=NULL) {
36
+		return \yii::$app->view->render($viewName, $params);
37 37
 	}
38 38
 
39
-	public function fromDispatcher($dispatcher){
39
+	public function fromDispatcher($dispatcher) {
40 40
 		$uri=new \Ajax\php\yii\URI();
41 41
 		return $uri->segment_array();
42 42
 	}
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlElementsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 	 * @param string $tagName
159 159
 	 * @return HtmlLabel
160 160
 	 */
161
-	public function htmlLabel($identifier, $content="", $icon=NULL,$tagName="div") {
162
-		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$icon, $tagName));
161
+	public function htmlLabel($identifier, $content="", $icon=NULL, $tagName="div") {
162
+		return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $icon, $tagName));
163 163
 	}
164 164
 
165 165
 	/**
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 	 * @param array $attributes
169 169
 	 * @return HtmlLabelGroups
170 170
 	 */
171
-	public function htmlLabelGroups($identifier,$labels=array(),$attributes=array()){
172
-		return $this->addHtmlComponent(new HtmlLabelGroups($identifier,$labels,$attributes));
171
+	public function htmlLabelGroups($identifier, $labels=array(), $attributes=array()) {
172
+		return $this->addHtmlComponent(new HtmlLabelGroups($identifier, $labels, $attributes));
173 173
 	}
174 174
 
175 175
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		}
36 36
 		if (isset($label))
37 37
 			$this->setLabel($label);
38
-		foreach ( $fields as $field ) {
38
+		foreach ($fields as $field) {
39 39
 			$this->addItem($field);
40 40
 		}
41 41
 		return $this;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function addItem($item) {
59 59
 		$item=parent::addItem($item);
60
-		if($item instanceof HtmlFormField)
60
+		if ($item instanceof HtmlFormField)
61 61
 			$item->setContainer($this);
62 62
 		return $item;
63 63
 	}
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 
99 99
 
100 100
 	public static function radios($name, $items=array(), $label=NULL, $value=null, $type=NULL) {
101
-		$fields=array ();
101
+		$fields=array();
102 102
 		$i=0;
103
-		foreach ( $items as $val => $caption ) {
103
+		foreach ($items as $val => $caption) {
104 104
 			$itemO=new HtmlFormRadio($name."-".$i++, $name, $caption, $val, $type);
105 105
 			if ($val===$value) {
106 106
 				$itemO->getField()->setProperty("checked", "");
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 	}
115 115
 
116 116
 	public static function checkeds($name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
117
-		$fields=array ();
117
+		$fields=array();
118 118
 		$i=0;
119
-		foreach ( $items as $val => $caption ) {
119
+		foreach ($items as $val => $caption) {
120 120
 			$itemO=new HtmlFormCheckbox($name."-".$i++, $name, $caption, $val, $type);
121 121
 			if (\array_search($val, $values)!==false) {
122 122
 				//TODO check getField
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FieldTrait.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 	abstract public function addToProperty($name, $value, $separator=" ");
18 18
 	abstract public function addLabel($caption, $style="label-default", $leftSeparator="&nbsp;");
19
-	abstract public function addContent($content,$before=false);
19
+	abstract public function addContent($content, $before=false);
20 20
 	abstract public function getField();
21 21
 	abstract public function getDataField();
22 22
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	}
26 26
 
27 27
 	public function addLoading() {
28
-		if ($this->_hasIcon === false) {
28
+		if ($this->_hasIcon===false) {
29 29
 			throw new \Exception("Input must have an icon for showing a loader, use addIcon before");
30 30
 		}
31 31
 		return $this->addToProperty("class", State::LOADING);
@@ -33,56 +33,56 @@  discard block
 block discarded – undo
33 33
 
34 34
 	public function labeled($label, $direction=Direction::LEFT, $icon=NULL) {
35 35
 		$field=$this->getField();
36
-		$labelO=$field->addLabel($label,$direction===Direction::LEFT,$icon);
37
-		$field->addToProperty("class", $direction . " labeled");
36
+		$labelO=$field->addLabel($label, $direction===Direction::LEFT, $icon);
37
+		$field->addToProperty("class", $direction." labeled");
38 38
 		return $labelO;
39 39
 	}
40 40
 
41 41
 	public function labeledToCorner($icon, $direction=Direction::LEFT) {
42
-		return $this->labeled("", $direction . " corner", $icon)->toCorner($direction);
42
+		return $this->labeled("", $direction." corner", $icon)->toCorner($direction);
43 43
 	}
44 44
 
45 45
 	public function addAction($action, $direction=Direction::RIGHT, $icon=NULL, $labeled=false) {
46 46
 		$field=$this->getField();
47 47
 		$actionO=$action;
48
-		if (\is_object($action) === false) {
49
-			$actionO=new HtmlButton("action-" . $this->identifier, $action);
48
+		if (\is_object($action)===false) {
49
+			$actionO=new HtmlButton("action-".$this->identifier, $action);
50 50
 			if (isset($icon))
51 51
 				$actionO->addIcon($icon, true, $labeled);
52 52
 		}
53
-		$field->addToProperty("class", $direction . " action");
54
-		$field->addContent($actionO, \strstr($direction, Direction::LEFT) !== false);
53
+		$field->addToProperty("class", $direction." action");
54
+		$field->addContent($actionO, \strstr($direction, Direction::LEFT)!==false);
55 55
 		return $actionO;
56 56
 	}
57 57
 
58
-	public function addDropdown($label="", $items=array(),$direction=Direction::RIGHT){
59
-		$labelO=new HtmlDropdown("dd-".$this->identifier,$label,$items);
60
-		$labelO->asSelect("select-".$this->identifier,false,true);
61
-		return $this->labeled($labelO,$direction);
58
+	public function addDropdown($label="", $items=array(), $direction=Direction::RIGHT) {
59
+		$labelO=new HtmlDropdown("dd-".$this->identifier, $label, $items);
60
+		$labelO->asSelect("select-".$this->identifier, false, true);
61
+		return $this->labeled($labelO, $direction);
62 62
 	}
63 63
 
64 64
 	public function setTransparent() {
65 65
 		return $this->getField()->addToProperty("class", "transparent");
66 66
 	}
67 67
 
68
-	public function setReadonly(){
68
+	public function setReadonly() {
69 69
 		$this->getDataField()->setProperty("readonly", "");
70 70
 		return $this;
71 71
 	}
72 72
 
73
-	public function setName($name){
74
-		$this->getDataField()->setProperty("name",$name);
73
+	public function setName($name) {
74
+		$this->getDataField()->setProperty("name", $name);
75 75
 		return $this;
76 76
 	}
77 77
 
78
-	public function setFluid(){
79
-		$this->getField()->addToProperty("class","fluid");
78
+	public function setFluid() {
79
+		$this->getField()->addToProperty("class", "fluid");
80 80
 		return $this;
81 81
 	}
82 82
 
83 83
 	public function setDisabled($disable=true) {
84 84
 		$field=$this->getField();
85
-		if($disable)
85
+		if ($disable)
86 86
 			$field->addToProperty("class", "disabled");
87 87
 		return $this;
88 88
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/CheckboxTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
 		return $this->getHtmlCk()->attachEvents($events);
39 39
 	}
40 40
 
41
-	public function getField(){
41
+	public function getField() {
42 42
 		//TODO check getField() ?
43 43
 		return $this->content["field"];
44 44
 	}
45 45
 
46
-	public function getHtmlCk(){
46
+	public function getHtmlCk() {
47 47
 		return $this->content["field"];
48 48
 	}
49 49
 
50
-	public function getDataField(){
51
-		$field= $this->getField();
52
-		if($field instanceof AbstractCheckbox)
50
+	public function getDataField() {
51
+		$field=$this->getField();
52
+		if ($field instanceof AbstractCheckbox)
53 53
 			$field=$field->getField();
54 54
 		return $field;
55 55
 	}
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 	 * @param boolean $value
60 60
 	 * @return HtmlFormField
61 61
 	 */
62
-	public function setChecked($value=true){
63
-		if($value===true){
62
+	public function setChecked($value=true) {
63
+		if ($value===true) {
64 64
 			$this->getDataField()->setProperty("checked", "checked");
65
-		}else{
65
+		} else {
66 66
 			$this->getDataField()->removeProperty("checked");
67 67
 		}
68 68
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlBreadcrumb.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		$this->startIndex=$startIndex;
53 53
 		$this->autoActive=$autoActive;
54 54
 		$this->_contentSeparator="<div class='divider'> / </div>";
55
-		$this->_hrefFunction=function ($e) {
55
+		$this->_hrefFunction=function($e) {
56 56
 			return $e->getContent();
57 57
 		};
58 58
 		if (isset($hrefFunction)) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * @return HtmlBreadcrumbs
69 69
 	 */
70 70
 	public function autoGetOnClick($targetSelector) {
71
-		return $this->getOnClick($this->root, $targetSelector, array ("attr" => $this->attr ));
71
+		return $this->getOnClick($this->root, $targetSelector, array("attr" => $this->attr));
72 72
 	}
73 73
 
74 74
 	public function contentAsString() {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function setActive($index=null) {
85 85
 		if (!isset($index)) {
86
-			$index=sizeof($this->content) - 1;
86
+			$index=sizeof($this->content)-1;
87 87
 		}
88 88
 		$activeItem=$this->content[$index];
89 89
 		$activeItem->addToProperty("class", "active");
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * @param Dispatcher $dispatcher the request dispatcher
97 97
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
98 98
 	 */
99
-	public function fromDispatcher(JsUtils $js,$dispatcher, $startIndex=0) {
99
+	public function fromDispatcher(JsUtils $js, $dispatcher, $startIndex=0) {
100 100
 		return $this->addItems($js->fromDispatcher($dispatcher));
101 101
 	}
102 102
 
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
 		if (!isset($index)) {
111 111
 			$index=sizeof($this->content);
112 112
 		}
113
-		if ($this->absolutePaths === true) {
113
+		if ($this->absolutePaths===true) {
114 114
 			return $this->_hrefFunction($this->content[$index]);
115 115
 		} else {
116
-			return $this->root . implode($separator, array_slice(array_map(function ($e) {
116
+			return $this->root.implode($separator, array_slice(array_map(function($e) {
117 117
 				return $this->_hrefFunction($e);
118
-			}, $this->content), $this->startIndex, $index + 1));
118
+			}, $this->content), $this->startIndex, $index+1));
119 119
 		}
120 120
 	}
121 121
 
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 			$this->setActive();
150 150
 		}
151 151
 		$count=$this->count();
152
-		for($i=1; $i < $count; $i++) {
153
-			$this->content[$i]->wrap($this->getContentDivider($i - 1));
152
+		for ($i=1; $i<$count; $i++) {
153
+			$this->content[$i]->wrap($this->getContentDivider($i-1));
154 154
 		}
155 155
 		return parent::compile($js, $view);
156 156
 	}
@@ -160,15 +160,15 @@  discard block
 block discarded – undo
160 160
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
161 161
 	 */
162 162
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
163
-		foreach ( $this->content as $element ) {
163
+		foreach ($this->content as $element) {
164 164
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
165 165
 		}
166 166
 		return $this;
167 167
 	}
168 168
 
169 169
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
170
-		foreach ( $this->content as $element ) {
171
-			if ($element->getProperty($this->attr) != NULL){
170
+		foreach ($this->content as $element) {
171
+			if ($element->getProperty($this->attr)!=NULL) {
172 172
 				$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
173 173
 			}
174 174
 		}
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	protected function createItem($value) {
185 185
 		$count=$this->count();
186
-		$itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
186
+		$itemO=new HtmlSemDoubleElement("item-".$this->identifier."-".$count, "a", "section");
187 187
 		if (\is_array($value))
188 188
 			$itemO->fromArray($value);
189 189
 		else {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	public function addIconAt($icon, $index) {
196 196
 		$item=$this->getItem($index);
197 197
 		if (isset($item)) {
198
-			$icon=new HtmlIcon("icon-" . $this->identifier, $icon);
198
+			$icon=new HtmlIcon("icon-".$this->identifier, $icon);
199 199
 			$item->wrapContent($icon);
200 200
 		}
201 201
 	}
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	public function addItem($item) {
204 204
 		$count=$this->count();
205 205
 		$itemO=parent::addItem($item);
206
-		$this->addToPropertyCtrl("class", "section", array ("section" ));
206
+		$this->addToPropertyCtrl("class", "section", array("section"));
207 207
 		$itemO->setProperty($this->attr, $this->getHref($count));
208 208
 		return $itemO;
209 209
 	}
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	public function setAbsolutePaths($absolutePaths) {
220 220
 		$this->absolutePaths=$absolutePaths;
221 221
 		$size=\sizeof($this->content);
222
-		for($i=0;$i<$size;$i++){
222
+		for ($i=0; $i<$size; $i++) {
223 223
 			$this->content[$i]->setProperty($this->attr, $this->getHref($i));
224 224
 		}
225 225
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 class HtmlPopup extends HtmlSemDoubleElement {
13 13
 	private $_container;
14
-	public function __construct(BaseHtml $container,$identifier, $content="") {
14
+	public function __construct(BaseHtml $container, $identifier, $content="") {
15 15
 		parent::__construct($identifier, "div");
16 16
 		$this->_container=$container;
17 17
 		$this->setClass("ui popup");
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 		$this->_params=array("on"=>"hover");
20 20
 	}
21 21
 
22
-	public function addList($items=array(),$header=NULL){
23
-		if(!$this->content instanceof HtmlGrid){
24
-			$this->content=new HtmlGrid("Grid-".$this->identifier,0);
22
+	public function addList($items=array(), $header=NULL) {
23
+		if (!$this->content instanceof HtmlGrid) {
24
+			$this->content=new HtmlGrid("Grid-".$this->identifier, 0);
25 25
 		}
26 26
 		$grid=$this->content;
27 27
 
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 		$colCount++;
30 30
 		$grid->setColsCount($colCount);
31 31
 
32
-		$list=new HtmlList("",$items);
32
+		$list=new HtmlList("", $items);
33 33
 		$list->asLink();
34
-		if(isset($header)){
35
-			$list->addHeader(4,$header);
34
+		if (isset($header)) {
35
+			$list->addHeader(4, $header);
36 36
 		}
37
-		$grid->getCell(0,$colCount-1)->setContent($list);
37
+		$grid->getCell(0, $colCount-1)->setContent($list);
38 38
 		$grid->setDivided()->setRelaxed(true);
39 39
 		return $list;
40 40
 	}
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * A popup can have no maximum width and continue to flow to fit its content
44 44
 	 */
45
-	public function setFlowing(){
45
+	public function setFlowing() {
46 46
 		return $this->addToProperty("class", "flowing");
47 47
 	}
48 48
 
49 49
 	/**
50 50
 	 * A popup can provide more basic formatting
51 51
 	 */
52
-	public function setBasic(){
52
+	public function setBasic() {
53 53
 		return $this->addToProperty("class", "basic");
54 54
 	}
55 55
 
@@ -57,22 +57,22 @@  discard block
 block discarded – undo
57 57
 	 * {@inheritDoc}
58 58
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
59 59
 	 */
60
-	public function run(JsUtils $js){
60
+	public function run(JsUtils $js) {
61 61
 		$this->_params["popup"]="#".$this->identifier;
62
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
62
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->_params);
63 63
 	}
64 64
 
65
-	public function setOn($event="click"){
65
+	public function setOn($event="click") {
66 66
 		$this->_params["on"]=$event;
67 67
 		return $this;
68 68
 	}
69 69
 
70
-	public function setInline($value=true){
70
+	public function setInline($value=true) {
71 71
 		$this->_params["inline"]=$value;
72 72
 		return $this;
73 73
 	}
74 74
 
75
-	public function setPosition($position){
75
+	public function setPosition($position) {
76 76
 		$this->_params["position"]=$position;
77 77
 		return $this;
78 78
 	}
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 use Ajax\semantic\traits\SemanticWidgetsTrait;
12 12
 
13 13
 class Semantic extends BaseGui {
14
-	use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait,
15
-	SemanticHtmlModulesTrait,SemanticHtmlViewsTrait,SemanticWidgetsTrait;
14
+	use SemanticComponentsTrait, SemanticHtmlElementsTrait, SemanticHtmlCollectionsTrait,
15
+	SemanticHtmlModulesTrait, SemanticHtmlViewsTrait, SemanticWidgetsTrait;
16 16
 
17 17
 	private $language;
18 18
 
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 	}
22 22
 
23 23
 
24
-	public function setLanguage($language){
25
-		if($language!==$this->language){
24
+	public function setLanguage($language) {
25
+		if ($language!==$this->language) {
26 26
 			$file=\realpath(dirname(__FILE__)."/semantic/components/validation/languages/".$language.".js");
27
-			if(\file_exists($file)){
27
+			if (\file_exists($file)) {
28 28
 				$script=\file_get_contents($file);
29
-				$this->js->exec($script,true);
29
+				$this->js->exec($script, true);
30 30
 				$this->language=$language;
31 31
 			}
32 32
 		}
Please login to merge, or discard this patch.