Passed
Push — master ( 1e14e5...bb9729 )
by Jean-Christophe
02:11
created
Ajax/ui/properties/Animation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  */
12 12
 class Animation extends BaseComponent {
13 13
 
14
-	public function __construct($duration = 400, $easing = "swing", $queue = false) {
14
+	public function __construct($duration=400, $easing="swing", $queue=false) {
15 15
 		$this->setDuration($duration);
16 16
 		$this->setEasing($easing);
17 17
 		$this->setQueue($queue);
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -23,22 +23,22 @@  discard block
 block discarded – undo
23 23
 class HtmlSemDoubleElement extends HtmlDoubleElement {
24 24
 	use BaseTrait;
25 25
 
26
-	protected $_popup = NULL;
26
+	protected $_popup=NULL;
27 27
 
28
-	protected $_dimmer = NULL;
28
+	protected $_dimmer=NULL;
29 29
 
30
-	protected $_toast = NULL;
30
+	protected $_toast=NULL;
31 31
 
32
-	protected $_sidebar = NULL;
32
+	protected $_sidebar=NULL;
33 33
 
34
-	protected $_params = array();
34
+	protected $_params=array();
35 35
 
36
-	public function __construct($identifier, $tagName = "p", $baseClass = "ui", $content = NULL) {
36
+	public function __construct($identifier, $tagName="p", $baseClass="ui", $content=NULL) {
37 37
 		parent::__construct($identifier, $tagName);
38
-		$this->_baseClass = $baseClass;
38
+		$this->_baseClass=$baseClass;
39 39
 		$this->setClass($baseClass);
40 40
 		if (isset($content)) {
41
-			$this->content = $content;
41
+			$this->content=$content;
42 42
 		}
43 43
 	}
44 44
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param string $variation
49 49
 	 * @param string $popupEvent
50 50
 	 */
51
-	public function setPopupAttributes($variation = NULL, $popupEvent = NULL) {
51
+	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
52 52
 		if (isset($this->_popup))
53 53
 			$this->_popup->setAttributes($variation, $popupEvent);
54 54
 	}
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	 * @param array $params
63 63
 	 * @return HtmlSemDoubleElement
64 64
 	 */
65
-	public function addPopup($title = "", $content = "", $variation = NULL, $params = array()) {
66
-		$this->_popup = new InternalPopup($this, $title, $content, $variation, $params);
65
+	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
66
+		$this->_popup=new InternalPopup($this, $title, $content, $variation, $params);
67 67
 		return $this;
68 68
 	}
69 69
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 * @param array $params
76 76
 	 * @return HtmlSemDoubleElement
77 77
 	 */
78
-	public function addPopupHtml($html = "", $variation = NULL, $params = array()) {
79
-		$this->_popup = new InternalPopup($this);
78
+	public function addPopupHtml($html="", $variation=NULL, $params=array()) {
79
+		$this->_popup=new InternalPopup($this);
80 80
 		$this->_popup->setHtml($html);
81 81
 		$this->_popup->setAttributes($variation, $params);
82 82
 		return $this;
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 	 * @param mixed $content
90 90
 	 * @return HtmlDimmer
91 91
 	 */
92
-	public function addDimmer($params = array(), $content = NULL) {
93
-		$dimmer = new HtmlDimmer("dimmer-" . $this->identifier, $content);
92
+	public function addDimmer($params=array(), $content=NULL) {
93
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
94 94
 		$dimmer->setParams($params);
95 95
 		$dimmer->setContainer($this);
96 96
 		$this->addContent($dimmer);
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 	 * @param string $icon
106 106
 	 * @return mixed|HtmlLabel
107 107
 	 */
108
-	public function addLabel($label, $before = false, $icon = NULL) {
109
-		$labelO = $label;
110
-		if (\is_object($label) === false) {
111
-			$labelO = new HtmlLabel("label-" . $this->identifier, $label);
108
+	public function addLabel($label, $before=false, $icon=NULL) {
109
+		$labelO=$label;
110
+		if (\is_object($label)===false) {
111
+			$labelO=new HtmlLabel("label-".$this->identifier, $label);
112 112
 			if (isset($icon))
113 113
 				$labelO->addIcon($icon);
114 114
 		} else {
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
 	 * @param string $icon
130 130
 	 * @return HtmlSemDoubleElement
131 131
 	 */
132
-	public function attachLabel($label, $side = Side::TOP, $direction = Direction::NONE, $icon = NULL) {
133
-		$label = $this->addLabel($label, true, $icon);
132
+	public function attachLabel($label, $side=Side::TOP, $direction=Direction::NONE, $icon=NULL) {
133
+		$label=$this->addLabel($label, true, $icon);
134 134
 		$label->setAttached($side, $direction);
135 135
 		return $this;
136 136
 	}
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 *
141 141
 	 * @return HtmlSemDoubleElement
142 142
 	 */
143
-	public function asLink($href = NULL, $target = NULL) {
143
+	public function asLink($href=NULL, $target=NULL) {
144 144
 		if (isset($href))
145 145
 			$this->setProperty("href", $href);
146 146
 		if (isset($target))
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
 	 * @param boolean $show
155 155
 	 * @return string
156 156
 	 */
157
-	public function jsShowDimmer($show = true) {
158
-		$status = "hide";
159
-		if ($show === true)
160
-			$status = "show";
161
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
157
+	public function jsShowDimmer($show=true) {
158
+		$status="hide";
159
+		if ($show===true)
160
+			$status="show";
161
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
162 162
 	}
163 163
 
164 164
 	/**
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * {@inheritdoc}
167 167
 	 * @see BaseHtml::compile()
168 168
 	 */
169
-	public function compile(JsUtils $js = NULL, &$view = NULL) {
169
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
170 170
 		if (isset($this->_popup)) {
171 171
 			$this->_popup->compile($js);
172 172
 		}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 * @see HtmlDoubleElement::run()
180 180
 	 */
181 181
 	public function run(JsUtils $js) {
182
-		$this->_bsComponent = $js->semantic()->generic("#" . $this->identifier);
182
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
183 183
 		parent::run($js);
184 184
 		$this->addEventsOnRun($js);
185 185
 		if (isset($this->_popup)) {
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 	 * @param boolean $ordered
198 198
 	 * @return \Ajax\common\html\html5\HtmlList
199 199
 	 */
200
-	public function addList($items, $ordered = false) {
201
-		$list = new HtmlList("list-" . $this->identifier, $items);
200
+	public function addList($items, $ordered=false) {
201
+		$list=new HtmlList("list-".$this->identifier, $items);
202 202
 		$list->setOrdered($ordered);
203 203
 		$list->setClass("ui list");
204 204
 		$this->addContent($list);
@@ -210,9 +210,9 @@  discard block
 block discarded – undo
210 210
 	 * @param ?array $params
211 211
 	 * @return \Ajax\semantic\components\Toast
212 212
 	 */
213
-	public function asToast($params = NULL) {
214
-		$this->_toast = new Toast();
215
-		$this->_toast->attach('#' . $this->_identifier);
213
+	public function asToast($params=NULL) {
214
+		$this->_toast=new Toast();
215
+		$this->_toast->attach('#'.$this->_identifier);
216 216
 		$this->setProperty('style', 'display:none;');
217 217
 		if (isset($params)) {
218 218
 			$this->_toast->setParams($params);
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
 	 * @param string $classes
227 227
 	 * @return \Ajax\semantic\components\Sidebar
228 228
 	 */
229
-	public function asSideBar($classes = '') {
230
-		$this->_sidebar = new Sidebar();
229
+	public function asSideBar($classes='') {
230
+		$this->_sidebar=new Sidebar();
231 231
 		$this->addToProperty('class', 'sidebar');
232 232
 		return $this->_sidebar;
233 233
 	}
Please login to merge, or discard this patch.
Ajax/semantic/components/Sidebar.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class Sidebar extends SimpleSemExtComponent {
16 16
 
17
-	public function __construct(JsUtils $js = NULL) {
17
+	public function __construct(JsUtils $js=NULL) {
18 18
 		parent::__construct($js);
19
-		$this->uiName = 'sidebar';
19
+		$this->uiName='sidebar';
20 20
 	}
21 21
 
22 22
 	public function show() {
@@ -46,32 +46,32 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public function setContext($value) {
49
-		$this->params['context'] = $value;
49
+		$this->params['context']=$value;
50 50
 		return $this;
51 51
 	}
52 52
 
53
-	public function setExclusive($value = true) {
54
-		$this->params['exclusive'] = true;
53
+	public function setExclusive($value=true) {
54
+		$this->params['exclusive']=true;
55 55
 		return $this;
56 56
 	}
57 57
 
58
-	public function setClosable($value = true) {
59
-		$this->params['closable'] = $value;
58
+	public function setClosable($value=true) {
59
+		$this->params['closable']=$value;
60 60
 		return $this;
61 61
 	}
62 62
 
63
-	public function setDimPage($value = true) {
64
-		$this->params['dimPage'] = $value;
63
+	public function setDimPage($value=true) {
64
+		$this->params['dimPage']=$value;
65 65
 		return $this;
66 66
 	}
67 67
 
68
-	public function setScrollLock($value = false) {
69
-		$this->params['scrollLock'] = $value;
68
+	public function setScrollLock($value=false) {
69
+		$this->params['scrollLock']=$value;
70 70
 		return $this;
71 71
 	}
72 72
 
73
-	public function setReturnScroll($value = false) {
74
-		$this->params['returnScroll'] = $value;
73
+	public function setReturnScroll($value=false) {
74
+		$this->params['returnScroll']=$value;
75 75
 		return $this;
76 76
 	}
77 77
 
Please login to merge, or discard this patch.
Ajax/common/BaseGui.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	protected $js;
31 31
 
32
-	public function __construct($autoCompile = true) {
33
-		$this->autoCompile = $autoCompile;
34
-		$this->components = array();
35
-		$this->htmlComponents = array();
32
+	public function __construct($autoCompile=true) {
33
+		$this->autoCompile=$autoCompile;
34
+		$this->components=array();
35
+		$this->htmlComponents=array();
36 36
 	}
37 37
 
38 38
 	public function isAutoCompile() {
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 	}
41 41
 
42 42
 	public function setAutoCompile($autoCompile) {
43
-		$this->autoCompile = $autoCompile;
43
+		$this->autoCompile=$autoCompile;
44 44
 		return $this;
45 45
 	}
46 46
 
47
-	public function compile($internal = false) {
48
-		if ($internal === false && $this->autoCompile === true)
47
+	public function compile($internal=false) {
48
+		if ($internal===false && $this->autoCompile===true)
49 49
 			throw new \Exception("Impossible to compile if autoCompile is set to 'true'");
50 50
 		foreach ($this->components as $component) {
51 51
 			$component->compile();
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 	}
54 54
 
55 55
 	public function setJs(JsUtils $js) {
56
-		$this->js = $js;
56
+		$this->js=$js;
57 57
 	}
58 58
 
59 59
 	public function addComponent(SimpleComponent $component, $attachTo, $params) {
60 60
 		if ($this->autoCompile) {
61
-			if ($attachTo != null) {
62
-				if (! isset($this->components[$attachTo])) {
63
-					$this->components[$attachTo] = $component;
61
+			if ($attachTo!=null) {
62
+				if (!isset($this->components[$attachTo])) {
63
+					$this->components[$attachTo]=$component;
64 64
 				} else {
65
-					$this->components[] = $component;
65
+					$this->components[]=$component;
66 66
 				}
67 67
 				$component->attach($attachTo);
68 68
 			} else {
69
-				$this->components[] = $component;
69
+				$this->components[]=$component;
70 70
 			}
71 71
 		}
72 72
 		if (isset($params))
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 
78 78
 	public function addHtmlComponent(BaseHtml $htmlComponent) {
79
-		$this->htmlComponents[$htmlComponent->getIdentifier()] = $htmlComponent;
79
+		$this->htmlComponents[$htmlComponent->getIdentifier()]=$htmlComponent;
80 80
 		return $htmlComponent;
81 81
 	}
82 82
 
83
-	public function compileHtml(JsUtils $js = NULL, &$view = NULL) {
83
+	public function compileHtml(JsUtils $js=NULL, &$view=NULL) {
84 84
 		foreach ($this->htmlComponents as $htmlComponent) {
85 85
 			$htmlComponent->compile($js, $view);
86 86
 		}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		return array_filter($this->htmlComponents, $callback);
91 91
 	}
92 92
 	
93
-	public function getHtmlComponent($identifier){
94
-		return $this->htmlComponents[$identifier]??'';
93
+	public function getHtmlComponent($identifier) {
94
+		return $this->htmlComponents[$identifier] ?? '';
95 95
 	}
96 96
 }
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  */
26 26
 class DataTable extends Widget {
27
-	use TableTrait,DataTableFieldAsTrait,HasCheckboxesTrait,BaseTrait;
27
+	use TableTrait, DataTableFieldAsTrait, HasCheckboxesTrait, BaseTrait;
28 28
 
29 29
 	protected $_searchField;
30 30
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 	protected $_displayBehavior;
42 42
 
43
-	protected $_visibleHover = false;
43
+	protected $_visibleHover=false;
44 44
 
45 45
 	protected $_targetSelector;
46 46
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 	protected $_json;
52 52
 
53
-	protected $_rowClass = "_element";
53
+	protected $_rowClass="_element";
54 54
 
55 55
 	protected $_sortable;
56 56
 
@@ -58,25 +58,25 @@  discard block
 block discarded – undo
58 58
 
59 59
 	protected $_colWidths;
60 60
 
61
-	public function __construct($identifier, $model, $modelInstance = NULL) {
61
+	public function __construct($identifier, $model, $modelInstance=NULL) {
62 62
 		parent::__construct($identifier, $model, $modelInstance);
63 63
 		$this->_init(new InstanceViewer($identifier), "table", new HtmlTable($identifier, 0, 0), false);
64
-		$this->_urls = [];
65
-		$this->_emptyMessage = new HtmlMessage("", "nothing to display");
64
+		$this->_urls=[];
65
+		$this->_emptyMessage=new HtmlMessage("", "nothing to display");
66 66
 		$this->_emptyMessage->setIcon("info circle");
67 67
 	}
68 68
 
69 69
 	public function run(JsUtils $js) {
70
-		$offset = $js->scriptCount();
70
+		$offset=$js->scriptCount();
71 71
 		if ($this->_hasCheckboxes && isset($js)) {
72 72
 			$this->_runCheckboxes($js);
73 73
 		}
74 74
 		if ($this->_visibleHover) {
75
-			$js->execOn("mouseover", "#" . $this->identifier . " tr", "$(event.currentTarget).closest('tr').find('.visibleover').css('visibility', 'visible');", [
75
+			$js->execOn("mouseover", "#".$this->identifier." tr", "$(event.currentTarget).closest('tr').find('.visibleover').css('visibility', 'visible');", [
76 76
 				"preventDefault" => false,
77 77
 				"stopPropagation" => true
78 78
 			]);
79
-			$js->execOn("mouseout", "#" . $this->identifier . " tr", "$(event.currentTarget).closest('tr').find('.visibleover').css('visibility', 'hidden');$(event.currentTarget).trigger('visibleoverOut');", [
79
+			$js->execOn("mouseout", "#".$this->identifier." tr", "$(event.currentTarget).closest('tr').find('.visibleover').css('visibility', 'hidden');$(event.currentTarget).trigger('visibleoverOut');", [
80 80
 				"preventDefault" => false,
81 81
 				"stopPropagation" => true
82 82
 			]);
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 
97 97
 	protected function _generateBehavior($op, $params, JsUtils $js) {
98 98
 		if (isset($this->_urls[$op])) {
99
-			$params = \array_merge($params, [
99
+			$params=\array_merge($params, [
100 100
 				"attr" => "data-ajax"
101 101
 			]);
102
-			$js->ajaxOnClick("#" . $this->identifier . " ._" . $op, $this->_urls[$op], $this->getTargetSelector($op), $params);
102
+			$js->ajaxOnClick("#".$this->identifier." ._".$op, $this->_urls[$op], $this->getTargetSelector($op), $params);
103 103
 		}
104 104
 	}
105 105
 
@@ -118,21 +118,21 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	public function refreshTD($fieldName, $jquery, $view) {
121
-		$index = $this->_getIndex($fieldName);
121
+		$index=$this->_getIndex($fieldName);
122 122
 		$this->compile($jquery, $view);
123 123
 		return $this->refreshTR()
124 124
 			->getTable()
125 125
 			->getCell(0, $index);
126 126
 	}
127 127
 
128
-	public function compile(JsUtils $js = NULL, &$view = NULL) {
129
-		if (! $this->_generated) {
128
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
129
+		if (!$this->_generated) {
130 130
 			if (isset($this->_buttonsColumn)) {
131 131
 				$this->_instanceViewer->sortColumnContent($this->_buttonsColumn, $this->_buttons);
132 132
 			}
133 133
 			$this->_instanceViewer->setInstance($this->_model);
134
-			$captions = $this->_instanceViewer->getCaptions();
135
-			$table = $this->content["table"];
134
+			$captions=$this->_instanceViewer->getCaptions();
135
+			$table=$this->content["table"];
136 136
 			if ($this->_hasCheckboxes) {
137 137
 				$this->_generateMainCheckbox($captions);
138 138
 			}
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
 			$this->compileExtraElements($table, $captions);
148 148
 			$this->_compileSearchFieldBehavior($js);
149 149
 
150
-			$this->content = JArray::sortAssociative($this->content, [
150
+			$this->content=JArray::sortAssociative($this->content, [
151 151
 				PositionInTable::BEFORETABLE,
152 152
 				"table",
153 153
 				PositionInTable::AFTERTABLE
154 154
 			]);
155 155
 			$this->_compileForm();
156 156
 			$this->_applyStyleAttributes($table);
157
-			$this->_generated = true;
157
+			$this->_generated=true;
158 158
 		}
159 159
 		return parent::compile($js, $view);
160 160
 	}
@@ -199,21 +199,21 @@  discard block
 block discarded – undo
199 199
 	}
200 200
 
201 201
 	protected function _generateContent($table) {
202
-		$objects = $this->_modelInstance;
202
+		$objects=$this->_modelInstance;
203 203
 		if (isset($this->_pagination)) {
204
-			$objects = $this->_pagination->getObjects($this->_modelInstance);
204
+			$objects=$this->_pagination->getObjects($this->_modelInstance);
205 205
 		}
206 206
 		InstanceViewer::setIndex(0);
207
-		$fields = $this->_instanceViewer->getSimpleProperties();
208
-		$groupByFields = $this->_instanceViewer->getGroupByFields();
209
-		if (! is_array($groupByFields)) {
210
-			$table->fromDatabaseObjects($objects, function ($instance) use ($table, $fields) {
207
+		$fields=$this->_instanceViewer->getSimpleProperties();
208
+		$groupByFields=$this->_instanceViewer->getGroupByFields();
209
+		if (!is_array($groupByFields)) {
210
+			$table->fromDatabaseObjects($objects, function($instance) use ($table, $fields) {
211 211
 				return $this->_generateRow($instance, $fields, $table);
212 212
 			});
213 213
 		} else {
214
-			$activeValues = array_combine($groupByFields, array_fill(0, sizeof($groupByFields), null));
215
-			$uuids = [];
216
-			$table->fromDatabaseObjects($objects, function ($instance) use ($table, $fields, &$activeValues, $groupByFields, &$uuids) {
214
+			$activeValues=array_combine($groupByFields, array_fill(0, sizeof($groupByFields), null));
215
+			$uuids=[];
216
+			$table->fromDatabaseObjects($objects, function($instance) use ($table, $fields, &$activeValues, $groupByFields, &$uuids) {
217 217
 				$this->_instanceViewer->setInstance($instance);
218 218
 				foreach ($groupByFields as $index => $gbField) {
219 219
 					$this->_generateGroupByRow($index, $gbField, $table, $fields, $activeValues, $uuids);
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
 				return $this->_generateRow($instance, $fields, $table, null, $uuids);
222 222
 			});
223 223
 		}
224
-		if ($table->getRowCount() == 0) {
225
-			$result = $table->addRow();
224
+		if ($table->getRowCount()==0) {
225
+			$result=$table->addRow();
226 226
 			$result->mergeRow();
227 227
 			$result->setValues([
228 228
 				$this->_emptyMessage
@@ -231,20 +231,20 @@  discard block
 block discarded – undo
231 231
 	}
232 232
 
233 233
 	protected function _generateGroupByRow($index, $gbField, $table, $fields, &$activeValues, &$uuids) {
234
-		$newValue = $this->_instanceViewer->getValue($gbField);
235
-		if ($this->getElementContent($activeValues[$gbField]) !== $this->getElementContent($newValue)) {
236
-			if ($index == 0) {
237
-				$uuids = [];
234
+		$newValue=$this->_instanceViewer->getValue($gbField);
235
+		if ($this->getElementContent($activeValues[$gbField])!==$this->getElementContent($newValue)) {
236
+			if ($index==0) {
237
+				$uuids=[];
238 238
 			}
239
-			$uuid = uniqid("grp");
240
-			$uuids[$gbField] = $uuid;
241
-			$id = $this->_instanceViewer->getIdentifier();
242
-			$result = $table->addMergeRow(sizeof($fields) + 1, $newValue);
243
-			$result->setIdentifier($this->identifier . "-tr-gb-" . $id);
239
+			$uuid=uniqid("grp");
240
+			$uuids[$gbField]=$uuid;
241
+			$id=$this->_instanceViewer->getIdentifier();
242
+			$result=$table->addMergeRow(sizeof($fields)+1, $newValue);
243
+			$result->setIdentifier($this->identifier."-tr-gb-".$id);
244 244
 			$result->setProperty("data-ajax", $id);
245 245
 			$result->setProperty("data-group", $uuid);
246 246
 			$result->addToProperty("class", $this->_rowClass);
247
-			$activeValues[$gbField] = $newValue;
247
+			$activeValues[$gbField]=$newValue;
248 248
 		}
249 249
 	}
250 250
 
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 	}
257 257
 
258 258
 	public function getFieldValue($index) {
259
-		$index = $this->_getIndex($index);
259
+		$index=$this->_getIndex($index);
260 260
 		if (is_numeric($index)) {
261
-			$values = $this->_instanceViewer->getValues();
261
+			$values=$this->_instanceViewer->getValues();
262 262
 			if (isset($values[$index])) {
263 263
 				return $values[$index];
264 264
 			}
@@ -266,31 +266,31 @@  discard block
 block discarded – undo
266 266
 		return null;
267 267
 	}
268 268
 
269
-	protected function _generateRow($instance, $fields, &$table, $checkedClass = null, $uuids = null) {
269
+	protected function _generateRow($instance, $fields, &$table, $checkedClass=null, $uuids=null) {
270 270
 		$this->_instanceViewer->setInstance($instance);
271
-		InstanceViewer::$index ++;
272
-		$values = $this->_instanceViewer->getValues();
273
-		$id = $this->_instanceViewer->getIdentifier();
274
-		$dataAjax = $id;
275
-		$id = $this->cleanIdentifier($id);
271
+		InstanceViewer::$index++;
272
+		$values=$this->_instanceViewer->getValues();
273
+		$id=$this->_instanceViewer->getIdentifier();
274
+		$dataAjax=$id;
275
+		$id=$this->cleanIdentifier($id);
276 276
 		if ($this->_hasCheckboxes) {
277
-			$ck = new HtmlCheckbox("ck-" . $this->identifier . "-" . $id, "");
278
-			$checked = false;
277
+			$ck=new HtmlCheckbox("ck-".$this->identifier."-".$id, "");
278
+			$checked=false;
279 279
 			if (isset($this->_checkedCallback)) {
280
-				$func = $this->_checkedCallback;
281
-				$checked = $func($instance);
280
+				$func=$this->_checkedCallback;
281
+				$checked=$func($instance);
282 282
 			}
283 283
 			$ck->setChecked($checked);
284 284
 			// $ck->setOnChange("event.stopPropagation();");
285
-			$field = $ck->getField();
285
+			$field=$ck->getField();
286 286
 			$field->setProperty("value", $dataAjax);
287 287
 			$field->setProperty("name", "selection[]");
288 288
 			if (isset($checkedClass))
289 289
 				$field->setClass($checkedClass);
290 290
 			\array_unshift($values, $ck);
291 291
 		}
292
-		$result = $table->newRow();
293
-		$result->setIdentifier($this->identifier . "-tr-" . $id);
292
+		$result=$table->newRow();
293
+		$result->setIdentifier($this->identifier."-tr-".$id);
294 294
 		$result->setProperty("data-ajax", $dataAjax);
295 295
 		$result->setValues($values);
296 296
 		$result->addToProperty("class", $this->_rowClass);
@@ -303,62 +303,62 @@  discard block
 block discarded – undo
303 303
 
304 304
 	protected function _generatePagination($table) {
305 305
 		if (isset($this->_toolbar)) {
306
-			if ($this->_toolbarPosition == PositionInTable::FOOTER)
306
+			if ($this->_toolbarPosition==PositionInTable::FOOTER)
307 307
 				$this->_toolbar->setFloated("left");
308 308
 		}
309
-		$footer = $table->getFooter();
309
+		$footer=$table->getFooter();
310 310
 		$footer->mergeCol();
311 311
 		$footer->addValues($this->_pagination->generateMenu($this->identifier));
312 312
 	}
313 313
 
314
-	protected function _associatePaginationBehavior(JsUtils $js = NULL, $offset = null) {
314
+	protected function _associatePaginationBehavior(JsUtils $js=NULL, $offset=null) {
315 315
 		if (isset($this->_urls["refresh"])) {
316
-			$menu = $this->_pagination->getMenu();
316
+			$menu=$this->_pagination->getMenu();
317 317
 			if (isset($menu) && isset($js)) {
318
-				$js->postOnClick("#" . $menu->getIdentifier() . " .item", $this->_urls["refresh"], "{'p':$(this).attr('data-page'),'_model':'" . JString::doubleBackSlashes($this->_model) . "'}", $this->getRefreshSelector(), [
318
+				$js->postOnClick("#".$menu->getIdentifier()." .item", $this->_urls["refresh"], "{'p':$(this).attr('data-page'),'_model':'".JString::doubleBackSlashes($this->_model)."'}", $this->getRefreshSelector(), [
319 319
 					"preventDefault" => false,
320 320
 					"jqueryDone" => "replaceWith",
321 321
 					"hasLoader" => false,
322
-					"jsCallback" => '$("#' . $this->identifier . '").trigger("pageChange");$("#' . $this->identifier . '").trigger("activeRowChange");'
322
+					"jsCallback" => '$("#'.$this->identifier.'").trigger("pageChange");$("#'.$this->identifier.'").trigger("activeRowChange");'
323 323
 				]);
324
-				$page = $_POST["p"] ?? null;
324
+				$page=$_POST["p"] ?? null;
325 325
 				if (isset($page)) {
326
-					$js->execAtLast('$("#' . $this->getIdentifier() . ' .pagination").children("a.item").removeClass("active");$("#' . $this->getIdentifier() . ' .pagination").children("a.item[data-page=' . $page . ']:not(.no-active)").addClass("active");');
326
+					$js->execAtLast('$("#'.$this->getIdentifier().' .pagination").children("a.item").removeClass("active");$("#'.$this->getIdentifier().' .pagination").children("a.item[data-page='.$page.']:not(.no-active)").addClass("active");');
327 327
 				}
328 328
 			}
329 329
 		}
330 330
 	}
331 331
 
332
-	protected function _compileSearchFieldBehavior(JsUtils $js = NULL) {
332
+	protected function _compileSearchFieldBehavior(JsUtils $js=NULL) {
333 333
 		if (isset($this->_searchField) && isset($js) && isset($this->_urls["refresh"])) {
334
-			$this->_searchField->postOn("change", $this->_urls["refresh"], "{'s':$(self).val(),'_model':'" . JString::doubleBackSlashes($this->_model) . "'}", "#" . $this->identifier . " tbody", [
334
+			$this->_searchField->postOn("change", $this->_urls["refresh"], "{'s':$(self).val(),'_model':'".JString::doubleBackSlashes($this->_model)."'}", "#".$this->identifier." tbody", [
335 335
 				"preventDefault" => false,
336 336
 				"jqueryDone" => "replaceWith",
337 337
 				"hasLoader" => "internal",
338
-				"jsCallback" => '$("#' . $this->identifier . '").trigger("searchTerminate",[$(self).val()]);'
338
+				"jsCallback" => '$("#'.$this->identifier.'").trigger("searchTerminate",[$(self).val()]);'
339 339
 			]);
340 340
 		}
341 341
 	}
342 342
 
343
-	protected function _associateSearchFieldBehavior(JsUtils $js = NULL, $offset = null) {}
343
+	protected function _associateSearchFieldBehavior(JsUtils $js=NULL, $offset=null) {}
344 344
 
345 345
 	protected function _getFieldName($index) {
346
-		$fieldName = parent::_getFieldName($index);
346
+		$fieldName=parent::_getFieldName($index);
347 347
 		if (\is_object($fieldName))
348
-			$fieldName = "field-" . $index;
349
-		return $fieldName . "[]";
348
+			$fieldName="field-".$index;
349
+		return $fieldName."[]";
350 350
 	}
351 351
 
352 352
 	protected function _getFieldCaption($index) {
353 353
 		return null;
354 354
 	}
355 355
 
356
-	protected function _setToolbarPosition($table, $captions = NULL) {
356
+	protected function _setToolbarPosition($table, $captions=NULL) {
357 357
 		switch ($this->_toolbarPosition) {
358 358
 			case PositionInTable::BEFORETABLE:
359 359
 			case PositionInTable::AFTERTABLE:
360
-				if (isset($this->_compileParts) === false) {
361
-					$this->content[$this->_toolbarPosition] = $this->_toolbar;
360
+				if (isset($this->_compileParts)===false) {
361
+					$this->content[$this->_toolbarPosition]=$this->_toolbar;
362 362
 				}
363 363
 				break;
364 364
 			case PositionInTable::HEADER:
@@ -385,11 +385,11 @@  discard block
 block discarded – undo
385 385
 	}
386 386
 
387 387
 	private function addToolbarRow($part, $table, $captions) {
388
-		$hasPart = $table->hasPart($part);
388
+		$hasPart=$table->hasPart($part);
389 389
 		if ($hasPart) {
390
-			$row = $table->getPart($part)->addRow(\sizeof($captions));
390
+			$row=$table->getPart($part)->addRow(\sizeof($captions));
391 391
 		} else {
392
-			$row = $table->getPart($part)->getRow(0);
392
+			$row=$table->getPart($part)->getRow(0);
393 393
 		}
394 394
 		$row->mergeCol();
395 395
 		$row->setValues([
@@ -421,12 +421,12 @@  discard block
 block discarded – undo
421 421
 	 */
422 422
 	public function setUrls($urls) {
423 423
 		if (\is_array($urls)) {
424
-			$this->_urls["refresh"] = JArray::getValue($urls, "refresh", 0);
425
-			$this->_urls["edit"] = JArray::getValue($urls, "edit", 1);
426
-			$this->_urls["delete"] = JArray::getValue($urls, "delete", 2);
427
-			$this->_urls["display"] = JArray::getValue($urls, "display", 3);
424
+			$this->_urls["refresh"]=JArray::getValue($urls, "refresh", 0);
425
+			$this->_urls["edit"]=JArray::getValue($urls, "edit", 1);
426
+			$this->_urls["delete"]=JArray::getValue($urls, "delete", 2);
427
+			$this->_urls["display"]=JArray::getValue($urls, "display", 3);
428 428
 		} else {
429
-			$this->_urls = [
429
+			$this->_urls=[
430 430
 				"refresh" => $urls,
431 431
 				"edit" => $urls,
432 432
 				"delete" => $urls,
@@ -449,8 +449,8 @@  discard block
 block discarded – undo
449 449
 	 *        	The number of visible pages in the Pagination component
450 450
 	 * @return DataTable
451 451
 	 */
452
-	public function paginate($page, $total_rowcount, $items_per_page = 10, $pages_visibles = null) {
453
-		$this->_pagination = new Pagination($items_per_page, $pages_visibles, $page, $total_rowcount);
452
+	public function paginate($page, $total_rowcount, $items_per_page=10, $pages_visibles=null) {
453
+		$this->_pagination=new Pagination($items_per_page, $pages_visibles, $page, $total_rowcount);
454 454
 		return $this;
455 455
 	}
456 456
 
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
 	 *        	The number of visible pages in the Pagination component
466 466
 	 * @return DataTable
467 467
 	 */
468
-	public function autoPaginate($page = 1, $items_per_page = 10, $pages_visibles = 4) {
469
-		$this->_pagination = new Pagination($items_per_page, $pages_visibles, $page);
468
+	public function autoPaginate($page=1, $items_per_page=10, $pages_visibles=4) {
469
+		$this->_pagination=new Pagination($items_per_page, $pages_visibles, $page);
470 470
 		return $this;
471 471
 	}
472 472
 
@@ -475,10 +475,10 @@  discard block
 block discarded – undo
475 475
 	 * @param array $compileParts
476 476
 	 * @return DataTable
477 477
 	 */
478
-	public function refresh($compileParts = [
478
+	public function refresh($compileParts=[
479 479
 		"tbody"
480 480
 	]) {
481
-		$this->_compileParts = $compileParts;
481
+		$this->_compileParts=$compileParts;
482 482
 		return $this;
483 483
 	}
484 484
 
@@ -488,14 +488,14 @@  discard block
 block discarded – undo
488 488
 	 * @param string $position
489 489
 	 * @return \Ajax\common\html\HtmlDoubleElement
490 490
 	 */
491
-	public function addSearchInToolbar($position = Direction::RIGHT) {
491
+	public function addSearchInToolbar($position=Direction::RIGHT) {
492 492
 		return $this->addInToolbar($this->getSearchField())
493 493
 			->setPosition($position);
494 494
 	}
495 495
 
496 496
 	public function getSearchField() {
497
-		if (isset($this->_searchField) === false) {
498
-			$this->_searchField = new HtmlInput("search-" . $this->identifier, "search", "", "Search...");
497
+		if (isset($this->_searchField)===false) {
498
+			$this->_searchField=new HtmlInput("search-".$this->identifier, "search", "", "Search...");
499 499
 			$this->_searchField->addIcon("search", Direction::RIGHT);
500 500
 		}
501 501
 		return $this->_searchField;
@@ -523,9 +523,9 @@  discard block
 block discarded – undo
523 523
 	}
524 524
 
525 525
 	protected function getTargetSelector($op) {
526
-		$result = $this->_targetSelector;
527
-		if (! isset($result[$op]))
528
-			$result = "#" . $this->identifier;
526
+		$result=$this->_targetSelector;
527
+		if (!isset($result[$op]))
528
+			$result="#".$this->identifier;
529 529
 		return $result[$op];
530 530
 	}
531 531
 
@@ -537,20 +537,20 @@  discard block
 block discarded – undo
537 537
 	 * @return DataTable
538 538
 	 */
539 539
 	public function setTargetSelector($_targetSelector) {
540
-		if (! \is_array($_targetSelector)) {
541
-			$_targetSelector = [
540
+		if (!\is_array($_targetSelector)) {
541
+			$_targetSelector=[
542 542
 				"edit" => $_targetSelector,
543 543
 				"delete" => $_targetSelector
544 544
 			];
545 545
 		}
546
-		$this->_targetSelector = $_targetSelector;
546
+		$this->_targetSelector=$_targetSelector;
547 547
 		return $this;
548 548
 	}
549 549
 
550 550
 	public function getRefreshSelector() {
551 551
 		if (isset($this->_refreshSelector))
552 552
 			return $this->_refreshSelector;
553
-		return "#" . $this->identifier . " tbody";
553
+		return "#".$this->identifier." tbody";
554 554
 	}
555 555
 
556 556
 	/**
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 	 * @return DataTable
560 560
 	 */
561 561
 	public function setRefreshSelector($_refreshSelector) {
562
-		$this->_refreshSelector = $_refreshSelector;
562
+		$this->_refreshSelector=$_refreshSelector;
563 563
 		return $this;
564 564
 	}
565 565
 
@@ -571,9 +571,9 @@  discard block
 block discarded – undo
571 571
 	public function show($modelInstance) {
572 572
 		if (\is_array($modelInstance)) {
573 573
 			if (isset($modelInstance[0]) && \is_array(array_values($modelInstance)[0]))
574
-				$modelInstance = \json_decode(\json_encode($modelInstance), FALSE);
574
+				$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
575 575
 		}
576
-		$this->_modelInstance = $modelInstance;
576
+		$this->_modelInstance=$modelInstance;
577 577
 	}
578 578
 
579 579
 	public function getRowClass() {
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 	 * @return DataTable
588 588
 	 */
589 589
 	public function setRowClass($_rowClass) {
590
-		$this->_rowClass = $_rowClass;
590
+		$this->_rowClass=$_rowClass;
591 591
 		return $this;
592 592
 	}
593 593
 
@@ -598,34 +598,34 @@  discard block
 block discarded – undo
598 598
 	 * @return DataTable
599 599
 	 */
600 600
 	public function setEmptyMessage($_emptyMessage) {
601
-		$this->_emptyMessage = $_emptyMessage;
601
+		$this->_emptyMessage=$_emptyMessage;
602 602
 		return $this;
603 603
 	}
604 604
 
605
-	public function setSortable($colIndex = NULL) {
606
-		$this->_sortable = $colIndex;
605
+	public function setSortable($colIndex=NULL) {
606
+		$this->_sortable=$colIndex;
607 607
 		return $this;
608 608
 	}
609 609
 
610
-	public function setActiveRowSelector($class = "active", $event = "click", $multiple = false) {
610
+	public function setActiveRowSelector($class="active", $event="click", $multiple=false) {
611 611
 		$this->_self->setActiveRowSelector($class, $event, $multiple);
612 612
 		return $this;
613 613
 	}
614 614
 
615 615
 	public function hideColumn($colIndex) {
616
-		if (! \is_array($this->_hiddenColumns))
617
-			$this->_hiddenColumns = [];
618
-		$this->_hiddenColumns[] = $colIndex;
616
+		if (!\is_array($this->_hiddenColumns))
617
+			$this->_hiddenColumns=[];
618
+		$this->_hiddenColumns[]=$colIndex;
619 619
 		return $this;
620 620
 	}
621 621
 
622 622
 	public function setColWidth($colIndex, $width) {
623
-		$this->_colWidths[$colIndex] = $width;
623
+		$this->_colWidths[$colIndex]=$width;
624 624
 		return $this;
625 625
 	}
626 626
 
627 627
 	public function setColWidths($_colWidths) {
628
-		$this->_colWidths = $_colWidths;
628
+		$this->_colWidths=$_colWidths;
629 629
 		return $this;
630 630
 	}
631 631
 
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 		return $this;
635 635
 	}
636 636
 
637
-	public function trigger($event, $params = "[]") {
637
+	public function trigger($event, $params="[]") {
638 638
 		return $this->getHtmlComponent()->trigger($event, $params);
639 639
 	}
640 640
 
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 	 * @param mixed $_displayBehavior
673 673
 	 */
674 674
 	public function setDisplayBehavior($_displayBehavior) {
675
-		$this->_displayBehavior = $_displayBehavior;
675
+		$this->_displayBehavior=$_displayBehavior;
676 676
 	}
677 677
 
678 678
 	/**
@@ -696,6 +696,6 @@  discard block
 block discarded – undo
696 696
 	 * @param boolean $_visibleHover
697 697
 	 */
698 698
 	public function setVisibleHover($_visibleHover) {
699
-		$this->_visibleHover = $_visibleHover;
699
+		$this->_visibleHover=$_visibleHover;
700 700
 	}
701 701
 }
Please login to merge, or discard this patch.
Ajax/service/Javascript.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,28 +3,28 @@  discard block
 block discarded – undo
3 3
 
4 4
 class Javascript {
5 5
 
6
-	public static $preventDefault = "\nif(event && event.preventDefault) event.preventDefault();\n";
6
+	public static $preventDefault="\nif(event && event.preventDefault) event.preventDefault();\n";
7 7
 
8
-	public static $stopPropagation = "\nif(event && event.stopPropagation) event.stopPropagation();\n";
8
+	public static $stopPropagation="\nif(event && event.stopPropagation) event.stopPropagation();\n";
9 9
 
10
-	public static function draggable($attr = "id") {
11
-		return 'var dt=event.dataTransfer || event.originalEvent.dataTransfer;dt.setData("text/plain",JSON.stringify({id:$(event.target).attr("id"),data:$(event.target).attr("' . $attr . '")}));';
10
+	public static function draggable($attr="id") {
11
+		return 'var dt=event.dataTransfer || event.originalEvent.dataTransfer;dt.setData("text/plain",JSON.stringify({id:$(event.target).attr("id"),data:$(event.target).attr("'.$attr.'")}));';
12 12
 	}
13 13
 
14
-	public static function dropZone($jqueryDone, $jsCallback = "") {
15
-		$done = ($jqueryDone != null) ? '$(event.target).' . $jqueryDone . '($("#"+_data.id));' : '';
16
-		return 'var dt=event.dataTransfer || event.originalEvent.dataTransfer;var _data=JSON.parse(dt.getData("text/plain"));' . $done . 'var data=_data.data;' . $jsCallback;
14
+	public static function dropZone($jqueryDone, $jsCallback="") {
15
+		$done=($jqueryDone!=null) ? '$(event.target).'.$jqueryDone.'($("#"+_data.id));' : '';
16
+		return 'var dt=event.dataTransfer || event.originalEvent.dataTransfer;var _data=JSON.parse(dt.getData("text/plain"));'.$done.'var data=_data.data;'.$jsCallback;
17 17
 	}
18 18
 
19 19
 	public static function containsCode($expression) {
20
-		return strrpos($expression, 'this') !== false || strrpos($expression, 'event') !== false || strrpos($expression, 'self') !== false;
20
+		return strrpos($expression, 'this')!==false || strrpos($expression, 'event')!==false || strrpos($expression, 'self')!==false;
21 21
 	}
22 22
 
23 23
 	public static function isFunction($jsCode) {
24 24
 		return JString::startswith($jsCode, "function");
25 25
 	}
26 26
 
27
-	public static function fileUploadBehavior($id = '') {
27
+	public static function fileUploadBehavior($id='') {
28 28
 		return "$('input:text, .ui.button', '#{$id}').on('click', function (e) {e.preventDefault();\$('input:file', '#{$id}').click();});
29 29
 				$('input:file', '#{$id}').on('change', function (e) {if(e.target.files.length){var name = e.target.files[0].name;$('input:text', $(e.target).parent()).val(name);}});";
30 30
 	}
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 	 * @return string
39 39
 	 */
40 40
 	public static function prep_element($element) {
41
-		if (self::containsCode($element) === false) {
42
-			$element = '"' . addslashes($element) . '"';
41
+		if (self::containsCode($element)===false) {
42
+			$element='"'.addslashes($element).'"';
43 43
 		}
44 44
 		return $element;
45 45
 	}
@@ -54,24 +54,24 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public static function prep_value($value) {
56 56
 		if (\is_array($value)) {
57
-			$value = implode(",", $value);
57
+			$value=implode(",", $value);
58 58
 		}
59
-		if (self::containsCode($value) === false) {
60
-			$value = \str_replace([
59
+		if (self::containsCode($value)===false) {
60
+			$value=\str_replace([
61 61
 				"\\",
62 62
 				"\""
63 63
 			], [
64 64
 				"\\\\",
65 65
 				"\\\""
66 66
 			], $value);
67
-			$value = '"' . $value . '"';
67
+			$value='"'.$value.'"';
68 68
 		}
69 69
 		return trim($value, "%");
70 70
 	}
71 71
 
72 72
 	public static function prep_jquery_selector($value) {
73
-		if (JString::startswith($value, '$(') === false) {
74
-			return '$(' . self::prep_value($value) . ')';
73
+		if (JString::startswith($value, '$(')===false) {
74
+			return '$('.self::prep_value($value).')';
75 75
 		}
76 76
 		return $value;
77 77
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlMessage.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
  * @version 1.001
17 17
  */
18 18
 class HtmlMessage extends HtmlSemDoubleElement {
19
-	use AttachedTrait,HasTimeoutTrait;
19
+	use AttachedTrait, HasTimeoutTrait;
20 20
 
21 21
 	protected $icon;
22 22
 
23 23
 	protected $close;
24 24
 
25
-	public function __construct($identifier, $content = "") {
25
+	public function __construct($identifier, $content="") {
26 26
 		parent::__construct($identifier, "div");
27
-		$this->_template = '<%tagName% id="%identifier%" %properties%>%close%%icon%%wrapContentBefore%%content%%wrapContentAfter%</%tagName%>';
27
+		$this->_template='<%tagName% id="%identifier%" %properties%>%close%%icon%%wrapContentBefore%%content%%wrapContentAfter%</%tagName%>';
28 28
 		$this->setClass("ui message");
29 29
 		$this->setContent($content);
30 30
 	}
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 	 * @return \Ajax\semantic\html\collections\HtmlMessage
37 37
 	 */
38 38
 	public function addHeader($header) {
39
-		$headerO = $header;
39
+		$headerO=$header;
40 40
 		if (\is_string($header)) {
41
-			$headerO = new HtmlSemDoubleElement("header-" . $this->identifier, "div");
41
+			$headerO=new HtmlSemDoubleElement("header-".$this->identifier, "div");
42 42
 			$headerO->setClass("header");
43 43
 			$headerO->setContent($header);
44 44
 		}
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 		$this->addToProperty("class", "icon");
54 54
 		$this->wrapContent("<div class='content'>", "</div>");
55 55
 		if (\is_string($icon)) {
56
-			$this->icon = new HtmlIcon("icon-" . $this->identifier, $icon);
56
+			$this->icon=new HtmlIcon("icon-".$this->identifier, $icon);
57 57
 		} else {
58
-			$this->icon = $icon;
58
+			$this->icon=$icon;
59 59
 		}
60 60
 		return $this;
61 61
 	}
@@ -72,23 +72,23 @@  discard block
 block discarded – undo
72 72
 	 *        	default : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>null,"headers"=>null,"historize"=>false)
73 73
 	 * @return $this
74 74
 	 */
75
-	public function getOnClose($url, $responseElement = "", $parameters = array()) {
75
+	public function getOnClose($url, $responseElement="", $parameters=array()) {
76 76
 		if (isset($this->close)) {
77 77
 			$this->close->getOnClick($url, $responseElement, $parameters);
78 78
 		}
79 79
 	}
80 80
 
81
-	public function addLoader($loaderIcon = "notched circle") {
81
+	public function addLoader($loaderIcon="notched circle") {
82 82
 		$this->setIcon($loaderIcon);
83 83
 		$this->icon->addToIcon("loading");
84 84
 		return $this;
85 85
 	}
86 86
 
87
-	public function setDismissable($dismiss = true) {
88
-		if ($dismiss === true)
89
-			$this->close = new HtmlIcon("close-" . $this->identifier, "close");
87
+	public function setDismissable($dismiss=true) {
88
+		if ($dismiss===true)
89
+			$this->close=new HtmlIcon("close-".$this->identifier, "close");
90 90
 		else
91
-			$this->close = NULL;
91
+			$this->close=NULL;
92 92
 		return $this;
93 93
 	}
94 94
 
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
99 99
 	 */
100 100
 	public function run(JsUtils $js) {
101
-		if (! isset($this->_bsComponent)) {
101
+		if (!isset($this->_bsComponent)) {
102 102
 			if (isset($this->close)) {
103
-				$js->execOn("click", "#" . $this->identifier . " .close", "$(this).closest('.message').transition({$this->_closeTransition}).trigger('close-message');");
103
+				$js->execOn("click", "#".$this->identifier." .close", "$(this).closest('.message').transition({$this->_closeTransition}).trigger('close-message');");
104 104
 			}
105 105
 			if (isset($this->_timeout)) {
106 106
 				$js->exec("setTimeout(function() { $('#{$this->identifier}').transition({$this->_closeTransition}).trigger('close-message'); }, {$this->_timeout});", true);
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
 		return parent::run($js);
110 110
 	}
111 111
 
112
-	public function setState($visible = true) {
113
-		$visible = ($visible === true) ? "visible" : "hidden";
112
+	public function setState($visible=true) {
113
+		$visible=($visible===true) ? "visible" : "hidden";
114 114
 		return $this->addToPropertyCtrl("class", $visible, array(
115 115
 			"visible",
116 116
 			"hidden"
117 117
 		));
118 118
 	}
119 119
 
120
-	public function setVariation($value = "floating") {
120
+	public function setVariation($value="floating") {
121 121
 		return $this->addToPropertyCtrl("class", $value, array(
122 122
 			"floating",
123 123
 			"compact"
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 	public function setMessage($message) {
140 140
 		if (\is_array($this->content)) {
141
-			$this->content[\sizeof($this->content) - 1] = $message;
141
+			$this->content[\sizeof($this->content)-1]=$message;
142 142
 		} else
143 143
 			$this->setContent($message);
144 144
 	}
Please login to merge, or discard this patch.