Completed
Push — master ( 506112...a79a4a )
by Jean-Christophe
02:53
created
Ajax/semantic/html/collections/form/traits/CheckboxTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
 		return $this->getHtmlCk()->attachEvents($events);
34 34
 	}
35 35
 
36
-	public function getField(){
36
+	public function getField() {
37 37
 		return $this->content["field"]->getField();
38 38
 	}
39 39
 
40
-	public function getHtmlCk(){
40
+	public function getHtmlCk() {
41 41
 		return $this->content["field"];
42 42
 	}
43 43
 
44
-	public function getDataField(){
45
-		$field= $this->getField();
46
-		if($field instanceof AbstractCheckbox)
44
+	public function getDataField() {
45
+		$field=$this->getField();
46
+		if ($field instanceof AbstractCheckbox)
47 47
 			$field=$field->getField();
48 48
 			return $field;
49 49
 	}
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 	 * @param boolean $value
54 54
 	 * @return \Ajax\semantic\html\collections\form\traits\CheckboxTrait
55 55
 	 */
56
-	public function setChecked($value=true){
57
-		if($value===true){
56
+	public function setChecked($value=true) {
57
+		if ($value===true) {
58 58
 			$this->getDataField()->setProperty("checked", "checked");
59
-		}else{
59
+		} else {
60 60
 			$this->getDataField()->removeProperty("checked");
61 61
 		}
62 62
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Ajax\semantic\html\base\constants\CheckboxType;
7 7
 
8 8
 abstract class AbstractCheckbox extends HtmlSemDoubleElement {
9
-	protected $_params=array ();
9
+	protected $_params=array();
10 10
 
11 11
 	public function __construct($identifier, $name=NULL, $label=NULL, $value=NULL, $inputType="checkbox", $type="checkbox") {
12 12
 		parent::__construct("ck-".$identifier, "div", "ui ".$type);
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 			$this->setLabel($label);
18 18
 	}
19 19
 
20
-	public function setChecked($value=true){
21
-		if($value===true){
20
+	public function setChecked($value=true) {
21
+		if ($value===true) {
22 22
 			$this->getField()->setProperty("checked", "checked");
23
-		}else{
23
+		} else {
24 24
 			$this->getField()->removeProperty("checked");
25 25
 		}
26 26
 		return $this;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @return \Ajax\semantic\html\collections\form\AbstractHtmlFormRadioCheckbox
83 83
 	 */
84 84
 	public function attachEvent($selector, $action=NULL) {
85
-		if (isset($action)!==false||\is_numeric($action)===true) {
85
+		if (isset($action)!==false || \is_numeric($action)===true) {
86 86
 			$js='$("#%identifier%").checkbox("attach events", "'.$selector.'", "'.$action.'");';
87 87
 		} else {
88 88
 			$js='$("#%identifier%").checkbox("attach events", "'.$selector.'");';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function attachEvents($events=array()) {
100 100
 		if (\is_array($events)) {
101
-			foreach ( $events as $action => $selector ) {
101
+			foreach ($events as $action => $selector) {
102 102
 				$this->attachEvent($selector, $action);
103 103
 			}
104 104
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	}
56 56
 
57 57
 	public function setFocusable($value=true) {
58
-		if ($value === true)
58
+		if ($value===true)
59 59
 			$this->setProperty("tabindex", "0");
60 60
 		else {
61 61
 			$this->removeProperty("tabindex");
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 
66 66
 	public function setAnimated($content, $animation="") {
67 67
 		$this->setTagName("div");
68
-		$this->addToProperty("class", "animated " . $animation);
69
-		$visible=new HtmlSemDoubleElement("visible-" . $this->identifier, "div");
68
+		$this->addToProperty("class", "animated ".$animation);
69
+		$visible=new HtmlSemDoubleElement("visible-".$this->identifier, "div");
70 70
 		$visible->setClass("visible content");
71 71
 		$visible->setContent($this->content);
72
-		$hidden=new HtmlSemDoubleElement("hidden-" . $this->identifier, "div");
72
+		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier, "div");
73 73
 		$hidden->setClass("hidden content");
74 74
 		$hidden->setContent($content);
75
-		$this->content=array ($visible,$hidden );
75
+		$this->content=array($visible, $hidden);
76 76
 		return $hidden;
77 77
 	}
78 78
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	public function asIcon($icon) {
85 85
 		$iconO=$icon;
86 86
 		if (\is_string($icon)) {
87
-			$iconO=new HtmlIcon("icon-" . $this->identifier, $icon);
87
+			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
88 88
 		}
89 89
 		$this->addToProperty("class", "icon");
90 90
 		$this->content=$iconO;
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 	public function addLabel($label, $before=false, $icon=NULL) {
107 107
 		$this->tagName="div";
108 108
 		$this->addToProperty("class", "labeled");
109
-		$this->content=new HtmlButton("button-" . $this->identifier, $this->content);
109
+		$this->content=new HtmlButton("button-".$this->identifier, $this->content);
110 110
 		$this->content->setTagName("div");
111
-		$label=new HtmlLabel("label-" . $this->identifier, $label, $icon,"a");
111
+		$label=new HtmlLabel("label-".$this->identifier, $label, $icon, "a");
112 112
 		$label->setBasic();
113 113
 		$this->addContent($label, $before);
114 114
 		return $label;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	public function fromArray($array) {
122 122
 		$array=parent::fromArray($array);
123
-		foreach ( $array as $key => $value ) {
123
+		foreach ($array as $key => $value) {
124 124
 			$this->setProperty($key, $value);
125 125
 		}
126 126
 		return $array;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	}
176 176
 
177 177
 	public static function social($identifier, $social, $value=NULL) {
178
-		if ($value === NULL)
178
+		if ($value===NULL)
179 179
 			$value=\ucfirst($social);
180 180
 		$return=new HtmlButton($identifier, $value);
181 181
 		$return->addIcon($social);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	}
196 196
 
197 197
 	public function asLink($href=NULL) {
198
-		$lnk=new HtmlLink("lnk-".$this->identifier,$href,$this->content);
198
+		$lnk=new HtmlLink("lnk-".$this->identifier, $href, $this->content);
199 199
 		$this->content=$lnk;
200 200
 		return $this;
201 201
 	}
Please login to merge, or discard this patch.