Passed
Push — master ( 15d416...16888f )
by Jean-Christophe
02:23
created
Ajax/semantic/components/SimpleSemExtComponent.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 		return $this;
18 18
 	}
19 19
 	
20
-	protected function generateParamParts(){
20
+	protected function generateParamParts() {
21 21
 		$results=[];
22
-		foreach ($this->paramParts as $paramPart){
22
+		foreach ($this->paramParts as $paramPart) {
23 23
 			$results[]="{$this->uiName}(".\implode(",", $paramPart).")";
24 24
 		}
25 25
 		return \implode(".", $results);
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 	public function getScript() {
29 29
 		$allParams=$this->params;
30
-		$this->jquery_code_for_compile=array ();
30
+		$this->jquery_code_for_compile=array();
31 31
 		$paramParts="";
32
-		if(\sizeof($this->paramParts)>0){
32
+		if (\sizeof($this->paramParts)>0) {
33 33
 			$paramParts=".".$this->generateParamParts();
34 34
 		}
35 35
 		$this->jquery_code_for_compile []="$( \"".$this->attachTo."\" ).{$this->uiName}(".$this->getParamsAsJSON($allParams).")".$paramParts.";";
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 		return $this;
43 43
 	}
44 44
 
45
-	public function addComponentEvent($event,$jsCode){
46
-		$jsCode=\str_ireplace("\"","%quote%", $jsCode);
45
+	public function addComponentEvent($event, $jsCode) {
46
+		$jsCode=\str_ireplace("\"", "%quote%", $jsCode);
47 47
 		return $this->setParam($event, "%function(){".$jsCode."}%");
48 48
 	}
49 49
 	
50
-	public function setJs(JsUtils $js){
50
+	public function setJs(JsUtils $js) {
51 51
 		$this->js=$js;
52 52
 		$js->semantic()->addComponent($this, $this->attachTo, $this->params);
53 53
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	protected $_popup=NULL;
26 26
 	protected $_dimmer=NULL;
27 27
 	protected $_toast=NULL;
28
-	protected $_params=array ();
28
+	protected $_params=array();
29 29
 
30 30
 
31 31
 	public function __construct($identifier, $tagName="p", $baseClass="ui", $content=NULL) {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 * @return HtmlDimmer
82 82
 	 */
83 83
 	public function addDimmer($params=array(), $content=NULL) {
84
-		$dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content);
84
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
85 85
 		$dimmer->setParams($params);
86 86
 		$dimmer->setContainer($this);
87 87
 		$this->addContent($dimmer);
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function addLabel($label, $before=false, $icon=NULL) {
99 99
 		$labelO=$label;
100
-		if (\is_object($label) === false) {
101
-			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
100
+		if (\is_object($label)===false) {
101
+			$labelO=new HtmlLabel("label-".$this->identifier, $label);
102 102
 			if (isset($icon))
103 103
 				$labelO->addIcon($icon);
104 104
 		} else {
105
-			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
105
+			$labelO->addToPropertyCtrl("class", "label", array("label"));
106 106
 		}
107 107
 		$this->addContent($labelO, $before);
108 108
 		return $labelO;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 * @param string $icon
117 117
 	 * @return HtmlSemDoubleElement
118 118
 	 */
119
-	public function attachLabel($label,$side=Side::TOP,$direction=Direction::NONE,$icon=NULL){
120
-		$label=$this->addLabel($label,true,$icon);
121
-		$label->setAttached($side,$direction);
119
+	public function attachLabel($label, $side=Side::TOP, $direction=Direction::NONE, $icon=NULL) {
120
+		$label=$this->addLabel($label, true, $icon);
121
+		$label->setAttached($side, $direction);
122 122
 		return $this;
123 123
 	}
124 124
 
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 	 * Transforms the element into a link
127 127
 	 * @return HtmlSemDoubleElement
128 128
 	 */
129
-	public function asLink($href=NULL,$target=NULL) {
129
+	public function asLink($href=NULL, $target=NULL) {
130 130
 		if (isset($href))
131 131
 			$this->setProperty("href", $href);
132
-		if(isset($target))
132
+		if (isset($target))
133 133
 			$this->setProperty("target", $target);
134 134
 		return $this->setTagName("a");
135 135
 	}
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	public function jsShowDimmer($show=true) {
143 143
 		$status="hide";
144
-		if ($show === true)
144
+		if ($show===true)
145 145
 			$status="show";
146
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
146
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @see BaseHtml::compile()
152 152
 	 */
153 153
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
154
-		if (isset($this->_popup)){
154
+		if (isset($this->_popup)) {
155 155
 			$this->_popup->compile($js);
156 156
 		}
157 157
 		return parent::compile($js, $view);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * @see HtmlDoubleElement::run()
163 163
 	 */
164 164
 	public function run(JsUtils $js) {
165
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
165
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
166 166
 		parent::run($js);
167 167
 		$this->addEventsOnRun($js);
168 168
 		if (isset($this->_popup)) {
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
 	 * @param boolean $ordered
180 180
 	 * @return \Ajax\common\html\html5\HtmlList
181 181
 	 */
182
-	public function addList($items,$ordered=false){
183
-		$list=new HtmlList("list-".$this->identifier,$items);
182
+	public function addList($items, $ordered=false) {
183
+		$list=new HtmlList("list-".$this->identifier, $items);
184 184
 		$list->setOrdered($ordered);
185 185
 		$list->setClass("ui list");
186 186
 		$this->addContent($list);
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
 	 * @param ?array $params
192 192
 	 * @return \Ajax\semantic\components\Toast
193 193
 	 */
194
-	public function asToast($params=NULL){
194
+	public function asToast($params=NULL) {
195 195
 		$this->_toast=new Toast();
196 196
 		$this->_toast->attach('#'.$this->_identifier);
197
-		if(isset($params)){
197
+		if (isset($params)) {
198 198
 			$this->_toast->setParams($params);
199 199
 		}
200 200
 		return $this->_toast;
Please login to merge, or discard this patch.