Completed
Push — master ( ef9455...966ba4 )
by Jean-Christophe
02:39
created
Ajax/semantic/html/collections/form/traits/FormTrait.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -14,27 +14,27 @@  discard block
 block discarded – undo
14 14
  * @author jc
15 15
  *
16 16
  */
17
-trait FormTrait{
17
+trait FormTrait {
18 18
 
19 19
 	/**
20 20
 	 * @return HtmlForm
21 21
 	 */
22 22
 	abstract protected function getForm();
23 23
 
24
-	protected function addCompoValidation(Form $compo,HtmlFormField $field){
24
+	protected function addCompoValidation(Form $compo, HtmlFormField $field) {
25 25
 		$validation=$field->getValidation();
26
-		if(isset($validation)){
26
+		if (isset($validation)) {
27 27
 			$validation->setIdentifier($field->getDataField()->getIdentifier());
28 28
 			$compo->addFieldValidation($validation);
29 29
 		}
30 30
 		return $compo;
31 31
 	}
32 32
 
33
-	protected function _runValidationParams(Form &$compo,JsUtils $js=NULL){
33
+	protected function _runValidationParams(Form&$compo, JsUtils $js=NULL) {
34 34
 		$form=$this->getForm();
35 35
 		$params=$form->getValidationParams();
36
-		if(isset($params["_ajaxSubmit"])){
37
-			$compilation=$this->_compileAjaxSubmit($params["_ajaxSubmit"],$js);
36
+		if (isset($params["_ajaxSubmit"])) {
37
+			$compilation=$this->_compileAjaxSubmit($params["_ajaxSubmit"], $js);
38 38
 			$this->onSuccess($compilation);
39 39
 			$form->removeValidationParam("_ajaxSubmit");
40 40
 		}
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 		$form->addEventsOnRun($js);
44 44
 	}
45 45
 
46
-	protected function _compileAjaxSubmit($ajaxSubmit,JsUtils $js=null){
46
+	protected function _compileAjaxSubmit($ajaxSubmit, JsUtils $js=null) {
47 47
 		$compilation="";
48
-		if(\is_array($ajaxSubmit)){
49
-			foreach ($ajaxSubmit as $ajaxSubmitItem){
48
+		if (\is_array($ajaxSubmit)) {
49
+			foreach ($ajaxSubmit as $ajaxSubmitItem) {
50 50
 				$compilation.=$ajaxSubmitItem->compile($js);
51 51
 			}
52
-		}elseif($ajaxSubmit instanceof AjaxCall){
52
+		}elseif ($ajaxSubmit instanceof AjaxCall) {
53 53
 			$compilation=$ajaxSubmit->compile($js);
54 54
 		}
55
-		$compilation=str_ireplace("\"","%quote%", $compilation);
55
+		$compilation=str_ireplace("\"", "%quote%", $compilation);
56 56
 		return $compilation;
57 57
 	}
58 58
 
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 		return $this;
66 66
 	}
67 67
 
68
-	public function setAttached($value=true){
68
+	public function setAttached($value=true) {
69 69
 		$form=$this->getForm();
70
-		if($value)
71
-			$form->addToPropertyCtrl("class", "attached", array ("attached" ));
70
+		if ($value)
71
+			$form->addToPropertyCtrl("class", "attached", array("attached"));
72 72
 		return $form;
73 73
 	}
74 74
 
75
-	public function addErrorMessage(){
75
+	public function addErrorMessage() {
76 76
 		return $this->getForm()->addContent((new HtmlMessage(""))->setError());
77 77
 	}
78 78
 
@@ -88,47 +88,47 @@  discard block
 block discarded – undo
88 88
 	 * @param array $parameters
89 89
 	 * @return HtmlForm
90 90
 	 */
91
-	public function submitOn($event,$identifierOrElement,$url,$responseElement,$parameters=NULL){
91
+	public function submitOn($event, $identifierOrElement, $url, $responseElement, $parameters=NULL) {
92 92
 		$form=$this->getForm();
93
-		if($identifierOrElement  instanceof BaseHtml)
93
+		if ($identifierOrElement  instanceof BaseHtml)
94 94
 			$elem=$identifierOrElement;
95 95
 		else
96 96
 			$elem=$form->getElementById($identifierOrElement, $form->getContent());
97
-		if(isset($elem)){
98
-			$this->_buttonAsSubmit($elem, $event,$url,$responseElement,$parameters);
97
+		if (isset($elem)) {
98
+			$this->_buttonAsSubmit($elem, $event, $url, $responseElement, $parameters);
99 99
 		}
100 100
 		return $form;
101 101
 	}
102 102
 
103
-	public function submitOnClick($identifier,$url,$responseElement,$parameters=NULL){
104
-		return $this->submitOn("click", $identifier, $url, $responseElement,$parameters);
103
+	public function submitOnClick($identifier, $url, $responseElement, $parameters=NULL) {
104
+		return $this->submitOn("click", $identifier, $url, $responseElement, $parameters);
105 105
 	}
106 106
 
107
-	public function addSubmit($identifier,$value,$cssStyle=NULL,$url=NULL,$responseElement=NULL,$parameters=NULL){
108
-		$bt=$this->getForm()->addButton($identifier, $value,$cssStyle);
109
-		return $this->_buttonAsSubmit($bt, "click",$url,$responseElement,$parameters);
107
+	public function addSubmit($identifier, $value, $cssStyle=NULL, $url=NULL, $responseElement=NULL, $parameters=NULL) {
108
+		$bt=$this->getForm()->addButton($identifier, $value, $cssStyle);
109
+		return $this->_buttonAsSubmit($bt, "click", $url, $responseElement, $parameters);
110 110
 	}
111 111
 
112
-	protected function _buttonAsSubmit(BaseHtml &$button,$event,$url,$responseElement=NULL,$parameters=NULL){
112
+	protected function _buttonAsSubmit(BaseHtml&$button, $event, $url, $responseElement=NULL, $parameters=NULL) {
113 113
 		$form=$this->getForm();
114
-		if(isset($url) && isset($responseElement)){
115
-			$button->addEvent($event, "$('#".$form->getIdentifier()."').form('validate form');",true,true);
116
-			$this->setSubmitParams($url,$responseElement,$parameters);
114
+		if (isset($url) && isset($responseElement)) {
115
+			$button->addEvent($event, "$('#".$form->getIdentifier()."').form('validate form');", true, true);
116
+			$this->setSubmitParams($url, $responseElement, $parameters);
117 117
 		}
118 118
 		return $button;
119 119
 	}
120 120
 
121
-	public function setSubmitParams($url,$responseElement=NULL,$parameters=NULL){
121
+	public function setSubmitParams($url, $responseElement=NULL, $parameters=NULL) {
122 122
 		$form=$this->getForm();
123
-		$params=["form"=>$form->getIdentifier(),"responseElement"=>$responseElement,"url"=>$url,"stopPropagation"=>true];
124
-		if(\is_array($parameters))
125
-			$params=\array_merge($params,$parameters);
123
+		$params=["form"=>$form->getIdentifier(), "responseElement"=>$responseElement, "url"=>$url, "stopPropagation"=>true];
124
+		if (\is_array($parameters))
125
+			$params=\array_merge($params, $parameters);
126 126
 		$form->addValidationParam("_ajaxSubmit", new AjaxCall("postForm", $params));
127 127
 		return $this;
128 128
 	}
129 129
 
130
-	public function addReset($identifier,$value,$cssStyle=NULL){
131
-		$bt=$this->getForm()->addButton($identifier, $value,$cssStyle);
130
+	public function addReset($identifier, $value, $cssStyle=NULL) {
131
+		$bt=$this->getForm()->addButton($identifier, $value, $cssStyle);
132 132
 		$bt->setProperty("type", "reset");
133 133
 		return $bt;
134 134
 	}
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @param string $jsCode
139 139
 	 * @return \Ajax\semantic\html\collections\form\HtmlForm
140 140
 	 */
141
-	public function onValid($jsCode){
141
+	public function onValid($jsCode) {
142 142
 		$form=$this->getForm();
143 143
 		$form->addValidationParam("onValid", "%function(){".$jsCode."}%");
144 144
 		return $form;
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
 	 * @param string $jsCode can use event and fields parameters
150 150
 	 * @return HtmlForm
151 151
 	 */
152
-	public function onSuccess($jsCode){
152
+	public function onSuccess($jsCode) {
153 153
 		$form=$this->getForm();
154
-		$form->addValidationParam("onSuccess", $jsCode,"%function(event,fields){","}%");
154
+		$form->addValidationParam("onSuccess", $jsCode, "%function(event,fields){", "}%");
155 155
 		return $form;
156 156
 	}
157 157
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/BaseTrait.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
  * @property HtmlSemDoubleElement $_self
16 16
  */
17 17
 trait BaseTrait {
18
-	protected $_variations=[ ];
19
-	protected $_states=[ ];
18
+	protected $_variations=[];
19
+	protected $_states=[];
20 20
 	protected $_baseClass;
21 21
 
22 22
 	abstract protected function setPropertyCtrl($name, $value, $typeCtrl);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 	abstract public function setProperty($name, $value);
31 31
 
32
-	abstract public function addContent($content,$before=false);
32
+	abstract public function addContent($content, $before=false);
33 33
 
34 34
 	abstract public function onCreate($jsCode);
35 35
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		$this->_self->setProperty("class", $this->_self->getBaseClass());
51 51
 		if (\is_string($variations))
52 52
 			$variations=\explode(" ", $variations);
53
-		foreach ( $variations as $variation ) {
53
+		foreach ($variations as $variation) {
54 54
 			$this->_self->addVariation($variation);
55 55
 		}
56 56
 		return $this;
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	public function addVariations($variations=array()) {
65 65
 		if (\is_string($variations))
66 66
 			$variations=\explode(" ", $variations);
67
-		foreach ( $variations as $variation ) {
67
+		foreach ($variations as $variation) {
68 68
 			$this->_self->addVariation($variation);
69 69
 		}
70 70
 		return $this;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	public function addStates($states=array()) {
74 74
 		if (\is_string($states))
75 75
 			$states=\explode(" ", $states);
76
-		foreach ( $states as $state ) {
76
+		foreach ($states as $state) {
77 77
 			$this->_self->addState($state);
78 78
 		}
79 79
 		return $this;
@@ -83,17 +83,17 @@  discard block
 block discarded – undo
83 83
 		$this->_self->setProperty("class", $this->_self->getBaseClass());
84 84
 		if (\is_string($states))
85 85
 			$states=\explode(" ", $states);
86
-		foreach ( $states as $state ) {
86
+		foreach ($states as $state) {
87 87
 			$this->_self->addState($state);
88 88
 		}
89 89
 		return $this;
90 90
 	}
91 91
 
92 92
 	public function addIcon($icon, $before=true) {
93
-		return $this->_self->addContent(new HtmlIcon("icon-" . $this->_self->getIdentifier(), $icon), $before);
93
+		return $this->_self->addContent(new HtmlIcon("icon-".$this->_self->getIdentifier(), $icon), $before);
94 94
 	}
95 95
 
96
-	public function addSticky($context="body"){
96
+	public function addSticky($context="body") {
97 97
 		$this->_self->onCreate("$('#".$this->_self->getIdentifier()."').sticky({ context: '".$context."'});");
98 98
 		return $this;
99 99
 	}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 * @return HtmlSemDoubleElement
115 115
 	 */
116 116
 	public function setDisabled($disable=true) {
117
-		if($disable)
117
+		if ($disable)
118 118
 			$this->_self->addToProperty("class", "disabled");
119 119
 		return $this;
120 120
 	}
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 *
141 141
 	 * @return HtmlSemDoubleElement
142 142
 	 */
143
-	public function asHeader(){
143
+	public function asHeader() {
144 144
 		return $this->_self->addToProperty("class", "header");
145 145
 	}
146 146
 
@@ -148,15 +148,15 @@  discard block
 block discarded – undo
148 148
 	 * show it is currently the active user selection
149 149
 	 * @return HtmlSemDoubleElement
150 150
 	 */
151
-	public function setActive($value=true){
152
-		if($value)
151
+	public function setActive($value=true) {
152
+		if ($value)
153 153
 			$this->_self->addToProperty("class", "active");
154 154
 		return $this;
155 155
 	}
156 156
 
157
-	public function setAttached($value=true){
158
-		if($value)
159
-			$this->_self->addToPropertyCtrl("class", "attached", array ("attached" ));
157
+	public function setAttached($value=true) {
158
+		if ($value)
159
+			$this->_self->addToPropertyCtrl("class", "attached", array("attached"));
160 160
 		return $this;
161 161
 	}
162 162
 
@@ -164,13 +164,13 @@  discard block
 block discarded – undo
164 164
 	 * can be formatted to appear on dark backgrounds
165 165
 	 */
166 166
 	public function setInverted($recursive=true) {
167
-		if($recursive===true){
167
+		if ($recursive===true) {
168 168
 			$content=$this->_self->getContent();
169
-			if($content instanceof HtmlSemDoubleElement)
169
+			if ($content instanceof HtmlSemDoubleElement)
170 170
 				$content->setInverted($recursive);
171
-			elseif(\is_array($content) || $content instanceof \Traversable){
172
-				foreach ($content as $elm){
173
-					if($elm instanceof  HtmlSemDoubleElement){
171
+			elseif (\is_array($content) || $content instanceof \Traversable) {
172
+				foreach ($content as $elm) {
173
+					if ($elm instanceof  HtmlSemDoubleElement) {
174 174
 						$elm->setInverted($recursive);
175 175
 					}
176 176
 				}
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	}
185 185
 
186 186
 	public function setFloated($direction="right") {
187
-		return $this->_self->addToPropertyCtrl("class", $direction . " floated", Direction::getConstantValues("floated"));
187
+		return $this->_self->addToPropertyCtrl("class", $direction." floated", Direction::getConstantValues("floated"));
188 188
 	}
189 189
 
190 190
 	public function floatRight() {
@@ -199,14 +199,14 @@  discard block
 block discarded – undo
199 199
 		return $this->_baseClass;
200 200
 	}
201 201
 
202
-	protected function addBehavior(&$array,$key,$value,$before="",$after=""){
203
-		if(\is_string($value)){
204
-			if(isset($array[$key])){
202
+	protected function addBehavior(&$array, $key, $value, $before="", $after="") {
203
+		if (\is_string($value)) {
204
+			if (isset($array[$key])) {
205 205
 				$p=JString::replaceAtFirstAndLast($array[$key], $before, "", $after, "");
206 206
 				$array[$key]=$before.$p.$value.$after;
207
-			}else
207
+			} else
208 208
 				$array[$key]=$before.$value.$after;
209
-		}else{
209
+		} else {
210 210
 			$array[$key]=$value;
211 211
 		}
212 212
 		return $this;
Please login to merge, or discard this patch.
Ajax/common/html/traits/BaseHtmlPropertiesTrait.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
  * @author jc
10 10
  * @property BaseWidget $_self
11 11
  */
12
-trait BaseHtmlPropertiesTrait{
12
+trait BaseHtmlPropertiesTrait {
13 13
 
14
-	protected $properties=array ();
14
+	protected $properties=array();
15 15
 	abstract protected function ctrl($name, $value, $typeCtrl);
16 16
 	abstract protected function removeOldValues(&$oldValue, $allValues);
17
-	abstract protected function _getElementBy($callback,$elements);
17
+	abstract protected function _getElementBy($callback, $elements);
18 18
 	public function getProperties() {
19 19
 		return $this->_self->properties;
20 20
 	}
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 
41 41
 	public function addToProperty($name, $value, $separator=" ") {
42 42
 		if (\is_array($value)) {
43
-			foreach ( $value as $v ) {
43
+			foreach ($value as $v) {
44 44
 				$this->_self->addToProperty($name, $v, $separator);
45 45
 			}
46
-		} else if ($value !== "" && $this->_self->propertyContains($name, $value) === false) {
46
+		} else if ($value!=="" && $this->_self->propertyContains($name, $value)===false) {
47 47
 			$v=@$this->_self->properties[$name];
48
-			if (isset($v) && $v !== "")
49
-				$v=$v . $separator . $value;
48
+			if (isset($v) && $v!=="")
49
+				$v=$v.$separator.$value;
50 50
 				else
51 51
 					$v=$value;
52 52
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	}
85 85
 
86 86
 	public function addToPropertyCtrlCheck($name, $value, $typeCtrl) {
87
-		if ($this->_self->ctrl($name, $value, $typeCtrl) === true) {
87
+		if ($this->_self->ctrl($name, $value, $typeCtrl)===true) {
88 88
 			return $this->_self->addToProperty($name, $value);
89 89
 		}
90 90
 		return $this;
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	protected function setPropertyCtrl($name, $value, $typeCtrl) {
108
-		if ($this->_self->ctrl($name, $value, $typeCtrl) === true)
108
+		if ($this->_self->ctrl($name, $value, $typeCtrl)===true)
109 109
 			return $this->_self->setProperty($name, $value);
110 110
 			return $this;
111 111
 	}
112 112
 
113
-	protected function getElementByPropertyValue($propertyName,$value, $elements) {
114
-		return $this->_self->_getElementBy(function(BaseHtml $element) use ($propertyName,$value){return $element->propertyContains($propertyName, $value) === true;}, $elements);
113
+	protected function getElementByPropertyValue($propertyName, $value, $elements) {
114
+		return $this->_self->_getElementBy(function(BaseHtml $element) use ($propertyName, $value){return $element->propertyContains($propertyName, $value)===true; }, $elements);
115 115
 	}
116 116
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/AttachedTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,6 @@
 block discarded – undo
17 17
 		if (isset($toElement) && \method_exists($toElement, "setAttached")) {
18 18
 			$toElement->setAttached(true);
19 19
 		}
20
-		return $this->addToPropertyCtrl("class", $side . " attached", Side::getConstantValues("attached"));
20
+		return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached"));
21 21
 	}
22 22
 }
Please login to merge, or discard this patch.
Ajax/common/html/PropertyWrapper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 			$output=$input;
13 13
 		}
14 14
 		if (\is_array($input)) {
15
-			if (sizeof($input) > 0) {
16
-				if (self::containsElement($input) === false) {
15
+			if (sizeof($input)>0) {
16
+				if (self::containsElement($input)===false) {
17 17
 					$output=self::wrapStrings($input, $separator=' ', $valueQuote='"');
18 18
 				} else {
19 19
 					$output=self::wrapObjects($input, $js, $separator, $valueQuote);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	private static function containsElement($input) {
27
-		foreach ( $input as $v ) {
27
+		foreach ($input as $v) {
28 28
 			if (\is_object($v) || \is_array($v))
29 29
 				return true;
30 30
 		}
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 	}
33 33
 
34 34
 	public static function wrapStrings($input, $separator=' ', $valueQuote='"') {
35
-		if (JArray::isAssociative($input) === true) {
36
-			$result=implode($separator, array_map(function ($v, $k) use($valueQuote) {
37
-				return $k . '=' . $valueQuote . $v . $valueQuote;
35
+		if (JArray::isAssociative($input)===true) {
36
+			$result=implode($separator, array_map(function($v, $k) use($valueQuote) {
37
+				return $k.'='.$valueQuote.$v.$valueQuote;
38 38
 			}, $input, array_keys($input)));
39 39
 		} else {
40 40
 			$result=implode($separator, array_values($input));
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 
45 45
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46
-		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
46
+		return implode($separator, array_map(function($v) use($js, $separator, $valueQuote) {
47 47
 			if (is_object($v))
48 48
 				return $v->compile($js);
49 49
 			elseif (\is_array($v)) {
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Social.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 Social extends BaseEnum {
5
-	const FACEBOOK="facebook", TWITTER="twitter",GOOGLEPLUS="google plus",VK="vk",LINKEDIN="linkedin",INSTAGRAM="instagram",YOUTUBE="youtube",GITHUB="github";
5
+	const FACEBOOK="facebook", TWITTER="twitter", GOOGLEPLUS="google plus", VK="vk", LINKEDIN="linkedin", INSTAGRAM="instagram", YOUTUBE="youtube", GITHUB="github";
6 6
 }
Please login to merge, or discard this patch.
Ajax/semantic/components/Popup.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 	 * @return $this
28 28
 	 */
29 29
 	public function setOnShow($jsCode) {
30
-		$jsCode=str_ireplace("\"","%quote%", $jsCode);
30
+		$jsCode=str_ireplace("\"", "%quote%", $jsCode);
31 31
 		return $this->setParam("onShow", "%function(){".$jsCode."}%");
32 32
 	}
33 33
 
34
-	public function setExclusive($value){
34
+	public function setExclusive($value) {
35 35
 		return $this->setParam("exclusive", $value);
36 36
 	}
37 37
 
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
 	 * @param string $popup the css selector of the popup
41 41
 	 * @return \Ajax\semantic\components\Popup
42 42
 	 */
43
-	public function setPopup($popup){
43
+	public function setPopup($popup) {
44 44
 		return $this->setParam("popup", $popup);
45 45
 	}
46 46
 
47
-	public function setInline($value){
47
+	public function setInline($value) {
48 48
 		return $this->setParam("inline", $value);
49 49
 	}
50 50
 
51
-	public function setPosition($value){
51
+	public function setPosition($value) {
52 52
 		return $this->setParam("position", $value);
53 53
 	}
54 54
 
55
-	public function setSetFluidWidth($value){
55
+	public function setSetFluidWidth($value) {
56 56
 		return $this->setParam("setFluidWidth", $value);
57 57
 	}
58 58
 }
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticWidgetsTrait.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 	 * @param array $instances
19 19
 	 * @return DataTable
20 20
 	 */
21
-	public function dataTable($identifier,$model, $instances){
22
-		return $this->addHtmlComponent(new DataTable($identifier,$model,$instances));
21
+	public function dataTable($identifier, $model, $instances) {
22
+		return $this->addHtmlComponent(new DataTable($identifier, $model, $instances));
23 23
 	}
24 24
 
25 25
 	/**
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 * @param array $instances
29 29
 	 * @return JsonDataTable
30 30
 	 */
31
-	public function jsonDataTable($identifier,$model, $instances){
32
-		return $this->addHtmlComponent(new JsonDataTable($identifier,$model,$instances));
31
+	public function jsonDataTable($identifier, $model, $instances) {
32
+		return $this->addHtmlComponent(new JsonDataTable($identifier, $model, $instances));
33 33
 	}
34 34
 
35 35
 	/**
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	 * @param object $instance
38 38
 	 * @return DataElement
39 39
 	 */
40
-	public function dataElement($identifier, $instance){
41
-		return $this->addHtmlComponent(new DataElement($identifier,$instance));
40
+	public function dataElement($identifier, $instance) {
41
+		return $this->addHtmlComponent(new DataElement($identifier, $instance));
42 42
 	}
43 43
 
44 44
 	/**
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	 * @param object $instance
47 47
 	 * @return DataForm
48 48
 	 */
49
-	public function dataForm($identifier, $instance){
50
-		return $this->addHtmlComponent(new DataForm($identifier,$instance));
49
+	public function dataForm($identifier, $instance) {
50
+		return $this->addHtmlComponent(new DataForm($identifier, $instance));
51 51
 	}
52 52
 
53 53
 	/**
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
 	 * @param object $instance
56 56
 	 * @return FormLogin
57 57
 	 */
58
-	public function defaultLogin($identifier,$instance=null){
59
-		return $this->addHtmlComponent(FormLogin::regular($identifier,$instance));
58
+	public function defaultLogin($identifier, $instance=null) {
59
+		return $this->addHtmlComponent(FormLogin::regular($identifier, $instance));
60 60
 	}
61 61
 
62 62
 	/**
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 * @param object $instance
65 65
 	 * @return FormLogin
66 66
 	 */
67
-	public function smallLogin($identifier,$instance=null){
68
-		return $this->addHtmlComponent(FormLogin::small($identifier,$instance));
67
+	public function smallLogin($identifier, $instance=null) {
68
+		return $this->addHtmlComponent(FormLogin::small($identifier, $instance));
69 69
 	}
70 70
 
71 71
 	/**
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 	 * @param object $instance
74 74
 	 * @return FormLogin
75 75
 	 */
76
-	public function segmentedLogin($identifier,$instance=null){
77
-		return $this->addHtmlComponent(FormLogin::attachedSegment($identifier,$instance));
76
+	public function segmentedLogin($identifier, $instance=null) {
77
+		return $this->addHtmlComponent(FormLogin::attachedSegment($identifier, $instance));
78 78
 	}
79 79
 
80 80
 	/**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @param object $instance
83 83
 	 * @return FormAccount
84 84
 	 */
85
-	public function defaultAccount($identifier,$instance=null){
86
-		return $this->addHtmlComponent(FormAccount::regular($identifier,$instance));
85
+	public function defaultAccount($identifier, $instance=null) {
86
+		return $this->addHtmlComponent(FormAccount::regular($identifier, $instance));
87 87
 	}
88 88
 }
Please login to merge, or discard this patch.
Ajax/semantic/widgets/business/user/FormAccount.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -10,61 +10,61 @@
 block discarded – undo
10 10
 	 * @param string $identifier
11 11
 	 * @param object $modelInstance
12 12
 	 */
13
-	public function __construct($identifier,$modelInstance=null,$fieldsOrder=[],$fieldsDefinition=[],$fields=[],$captions=[],$separators=[]) {
14
-		parent::__construct($identifier,$modelInstance,$fieldsOrder,$fieldsDefinition,$fields,$captions,$separators);
13
+	public function __construct($identifier, $modelInstance=null, $fieldsOrder=[], $fieldsDefinition=[], $fields=[], $captions=[], $separators=[]) {
14
+		parent::__construct($identifier, $modelInstance, $fieldsOrder, $fieldsDefinition, $fields, $captions, $separators);
15 15
 	}
16 16
 
17
-	protected function getDefaultModelInstance(){
17
+	protected function getDefaultModelInstance() {
18 18
 		return new UserModel();
19 19
 	}
20 20
 
21
-	public static function regular($identifier,$modelInstance=null){
22
-		return new FormAccount($identifier,$modelInstance,
23
-				["message","login","password","passwordConf","email","submit","error"],
21
+	public static function regular($identifier, $modelInstance=null) {
22
+		return new FormAccount($identifier, $modelInstance,
23
+				["message", "login", "password", "passwordConf", "email", "submit", "error"],
24 24
 				["message"=>[["icon"=>"sign in"]],
25 25
 						"input0"=>[["rules"=>"empty"]],
26
-						"input1"=>[["inputType"=>"password","rules"=> ['minLength[6]', 'empty']]],
27
-						"input2"=>[["inputType"=>"password","rules"=> ['minLength[6]', 'empty', 'match[password]']]],
26
+						"input1"=>[["inputType"=>"password", "rules"=> ['minLength[6]', 'empty']]],
27
+						"input2"=>[["inputType"=>"password", "rules"=> ['minLength[6]', 'empty', 'match[password]']]],
28 28
 						"input3"=>[["rules"=>"email"]],
29 29
 						"submit"=>["green fluid"],
30 30
 						"message2"=>[["error"=>true]]],
31
-				["Account","login","password","passwordConf","email","submit","error"],
32
-				["Please enter your account informations","Login","Password","Password confirmation","Email address","Creation"],
33
-				[0,1,3,4,5,6]);
31
+				["Account", "login", "password", "passwordConf", "email", "submit", "error"],
32
+				["Please enter your account informations", "Login", "Password", "Password confirmation", "Email address", "Creation"],
33
+				[0, 1, 3, 4, 5, 6]);
34 34
 	}
35 35
 
36
-	public static function smallInline($identifier,$modelInstance=null){
37
-		$result=new FormAccount($identifier,$modelInstance,
38
-				["login","password","submit"],
39
-				["input0"=>[["rules"=>"empty"]],"input1"=>[["inputType"=>"password","rules"=>"empty"]],"submit"=>["green basic"]],
40
-				["login","password","submit"],
41
-				["","","Connection"],
36
+	public static function smallInline($identifier, $modelInstance=null) {
37
+		$result=new FormAccount($identifier, $modelInstance,
38
+				["login", "password", "submit"],
39
+				["input0"=>[["rules"=>"empty"]], "input1"=>[["inputType"=>"password", "rules"=>"empty"]], "submit"=>["green basic"]],
40
+				["login", "password", "submit"],
41
+				["", "", "Connection"],
42 42
 				[2]);
43 43
 			$result->addDividerBefore(0, "Connection");
44 44
 		return $result;
45 45
 	}
46 46
 
47
-	public static function small($identifier,$modelInstance=null){
48
-		$result=new FormAccount($identifier,$modelInstance,
49
-				["login","password","passwordConf","email","submit"],
47
+	public static function small($identifier, $modelInstance=null) {
48
+		$result=new FormAccount($identifier, $modelInstance,
49
+				["login", "password", "passwordConf", "email", "submit"],
50 50
 				[
51 51
 						"input0"=>[["rules"=>"empty"]],
52
-						"input1"=>[["inputType"=>"password","rules"=>['minLength[6]', 'empty']]],
53
-						"input2"=>[["inputType"=>"password","rules"=> ['minLength[6]', 'empty', 'match[password]']]],
52
+						"input1"=>[["inputType"=>"password", "rules"=>['minLength[6]', 'empty']]],
53
+						"input2"=>[["inputType"=>"password", "rules"=> ['minLength[6]', 'empty', 'match[password]']]],
54 54
 						"input3"=>[["rules"=>"email"]],
55 55
 						"submit"=>["green basic"]],
56
-				["login","password","passwordConf","email","submit"],
57
-				["Login","Password","Password confirmation","Email address","Creation"],
58
-				[1,2]);
56
+				["login", "password", "passwordConf", "email", "submit"],
57
+				["Login", "Password", "Password confirmation", "Email address", "Creation"],
58
+				[1, 2]);
59 59
 		$result->addDividerBefore(0, "Creation");
60 60
 		return $result;
61 61
 	}
62 62
 
63
-	public static function attachedSegment($identifier,$modelInstance=null){
64
-		$result=self::regular($identifier,$modelInstance);
65
-		$result->fieldAsMessage("message",["icon"=>"sign in","attached"=>true]);
66
-		$result->addWrapper("message",null,"<div class='ui attached segment'>");
67
-		$result->addWrapper("error", null,"</div>");
63
+	public static function attachedSegment($identifier, $modelInstance=null) {
64
+		$result=self::regular($identifier, $modelInstance);
65
+		$result->fieldAsMessage("message", ["icon"=>"sign in", "attached"=>true]);
66
+		$result->addWrapper("message", null, "<div class='ui attached segment'>");
67
+		$result->addWrapper("error", null, "</div>");
68 68
 		return $result;
69 69
 	}
70 70
 }
Please login to merge, or discard this patch.