Completed
Push — master ( 8e32f8...32ad89 )
by Jean-Christophe
03:26
created
Ajax/common/html/html5/HtmlInput.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 
8 8
 class HtmlInput extends HtmlSingleElement {
9 9
 
10
-	public function __construct($identifier,$type="text",$value="",$placeholder="") {
10
+	public function __construct($identifier, $type="text", $value="", $placeholder="") {
11 11
 		parent::__construct($identifier, "input");
12 12
 		$this->setProperty("name", $identifier);
13 13
 		$this->setProperty("value", $value);
14
-		if(JString::isNotNull($placeholder))
14
+		if (JString::isNotNull($placeholder))
15 15
 			$this->setProperty("placeholder", $placeholder);
16 16
 		$this->setProperty("type", $type);
17 17
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 
11 11
 class HtmlLabel extends HtmlSemDoubleElement {
12 12
 	use LabeledIconTrait;
13
-	public function __construct($identifier,$caption="",$tagName="div") {
14
-		parent::__construct($identifier,$tagName,"ui label");
13
+	public function __construct($identifier, $caption="", $tagName="div") {
14
+		parent::__construct($identifier, $tagName, "ui label");
15 15
 		$this->content=$caption;
16 16
 	}
17 17
 
@@ -19,33 +19,33 @@  discard block
 block discarded – undo
19 19
 	 * @param string $side
20 20
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
21 21
 	 */
22
-	public function setPointing($value=Direction::NONE){
23
-		return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing"));
22
+	public function setPointing($value=Direction::NONE) {
23
+		return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
24 24
 	}
25 25
 
26 26
 	/**
27 27
 	 * @param string $side
28 28
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
29 29
 	 */
30
-	public function toCorner($side="left"){
31
-		return $this->addToPropertyCtrl("class", $side." corner",array("right corner","left corner"));
30
+	public function toCorner($side="left") {
31
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
32 32
 	}
33 33
 
34 34
 	/**
35 35
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
36 36
 	 */
37
-	public function asTag(){
37
+	public function asTag() {
38 38
 		return $this->addToProperty("class", "tag");
39 39
 	}
40 40
 
41 41
 	/**
42 42
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
43 43
 	 */
44
-	public function asLink(){
44
+	public function asLink() {
45 45
 		return $this->setTagName("a");
46 46
 	}
47 47
 
48
-	public function setBasic(){
48
+	public function setBasic() {
49 49
 		return $this->addToProperty("class", "basic");
50 50
 	}
51 51
 
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
 	 * @param string $before
57 57
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
58 58
 	 */
59
-	public function addImage($src,$alt="",$before=true){
59
+	public function addImage($src, $alt="", $before=true) {
60 60
 		$this->addToProperty("class", "image");
61
-		return $this->addContent(new HtmlImg("image-".$this->identifier,$src,$alt),$before);
61
+		return $this->addContent(new HtmlImg("image-".$this->identifier, $src, $alt), $before);
62 62
 	}
63 63
 
64 64
 	/**
65 65
 	 * @param string $detail
66 66
 	 * @return \Ajax\common\html\HtmlDoubleElement
67 67
 	 */
68
-	public function addDetail($detail){
69
-		$div=new HtmlDoubleElement("detail-".$this->identifier,$this->tagName);
68
+	public function addDetail($detail) {
69
+		$div=new HtmlDoubleElement("detail-".$this->identifier, $this->tagName);
70 70
 		$div->setClass("detail");
71 71
 		$div->setContent($detail);
72 72
 		$this->addContent($div);
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/State.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class State extends BaseEnum {
8
-	const ACTIVE="active",DISABLED="disabled",ERROR="error",FOCUS="focus",LOADING="loading";
8
+	const ACTIVE="active", DISABLED="disabled", ERROR="error", FOCUS="focus", LOADING="loading";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlListItem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 
8 8
 class HtmlListItem extends HtmlSemDoubleElement {
9 9
 	protected $image;
10
-	public function __construct($identifier,$content) {
10
+	public function __construct($identifier, $content) {
11 11
 		parent::__construct($identifier, "div", "item");
12 12
 		$this->_template='<%tagName% id="%identifier%" %properties%>%image%%content%</%tagName%>';
13 13
 		$this->content=$content;
14 14
 	}
15
-	public function addIcon($icon){
15
+	public function addIcon($icon) {
16 16
 		$content=$this->content;
17
-		$this->content=new HtmlSemDoubleElement("content-".$this->identifier,"div","content");
17
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content");
18 18
 		$this->content->setContent($content);
19
-		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon),true);
19
+		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon), true);
20 20
 	}
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Variation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class Variation extends BaseEnum {
8
-	const ANIMATED="animated",AVATAR="avatar",COMPACT="compact",FLUID="fluid",INVERTED="inverted",PADDED="padded",TRANSPARENT="transparent";
8
+	const ANIMATED="animated", AVATAR="avatar", COMPACT="compact", FLUID="fluid", INVERTED="inverted", PADDED="padded", TRANSPARENT="transparent";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,22 +5,22 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemCollection;
6 6
 use Ajax\semantic\html\content\HtmlListItem;
7 7
 
8
-class HtmlList extends HtmlSemCollection{
8
+class HtmlList extends HtmlSemCollection {
9 9
 
10 10
 
11
-	public function __construct( $identifier, $items=array()){
12
-		parent::__construct( $identifier, "div", "ui list");
11
+	public function __construct($identifier, $items=array()) {
12
+		parent::__construct($identifier, "div", "ui list");
13 13
 		$this->addItems($items);
14 14
 	}
15 15
 
16 16
 
17
-	protected function createItem($value){
17
+	protected function createItem($value) {
18 18
 		$count=$this->count();
19
-		if(\is_array($value)){
19
+		if (\is_array($value)) {
20 20
 			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
21 21
 			$item->addIcon($value[1]);
22 22
 		}else
23
-			$item= new HtmlListItem("item-".$this->identifier."-".$count, $value);
23
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
24 24
 		return $item;
25 25
 	}
26 26
 
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 * @param string $identifier
75 75
 	 * @param string $icon
76 76
 	 */
77
-	public function htmlIcon($identifier,$icon){
77
+	public function htmlIcon($identifier, $icon) {
78 78
 		return $this->addHtmlComponent(new HtmlIcon($identifier, $icon));
79 79
 	}
80 80
 
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 	 * @param string $size
84 84
 	 * @param array $icons
85 85
 	 */
86
-	public function htmlIconGroups($identifier,$size="",$icons=array()){
87
-		$group=new HtmlIconGroups($identifier,$size);
88
-		if(JArray::isAssociative($icons)){
89
-			foreach ($icons as $icon=>$size){
90
-				$group->add($icon,$size);
86
+	public function htmlIconGroups($identifier, $size="", $icons=array()) {
87
+		$group=new HtmlIconGroups($identifier, $size);
88
+		if (JArray::isAssociative($icons)) {
89
+			foreach ($icons as $icon=>$size) {
90
+				$group->add($icon, $size);
91 91
 			}
92
-		}else{
93
-			foreach ($icons as $icon){
92
+		}else {
93
+			foreach ($icons as $icon) {
94 94
 				$group->add($icon);
95 95
 			}
96 96
 		}
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 	 * @param array $elements
103 103
 	 * @param boolean $asIcons
104 104
 	 */
105
-	public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){
106
-		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons));
105
+	public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) {
106
+		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons));
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @param string $identifier
112 112
 	 * @param string $content
113 113
 	 */
114
-	public function htmlContainer($identifier,$content=""){
114
+	public function htmlContainer($identifier, $content="") {
115 115
 		return $this->addHtmlComponent(new HtmlContainer($identifier, $content));
116 116
 	}
117 117
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 	 * @param string $identifier
120 120
 	 * @param string $content
121 121
 	 */
122
-	public function htmlDivider($identifier,$content="",$tagName="div"){
123
-		return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName));
122
+	public function htmlDivider($identifier, $content="", $tagName="div") {
123
+		return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName));
124 124
 	}
125 125
 
126 126
 	/**
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 	 * @param string $content
129 129
 	 * @param string $tagName
130 130
 	 */
131
-	public function htmlLabel($identifier,$content="",$tagName="div"){
132
-		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName));
131
+	public function htmlLabel($identifier, $content="", $tagName="div") {
132
+		return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName));
133 133
 	}
134 134
 
135 135
 	/**
@@ -137,24 +137,24 @@  discard block
 block discarded – undo
137 137
 	 * @param array $items
138 138
 	 * @return Ajax\semantic\html\collections\HtmlMenu
139 139
 	 */
140
-	public function htmlMenu($identifier,$items=array()){
141
-		return $this->addHtmlComponent(new HtmlMenu($identifier,$items));
140
+	public function htmlMenu($identifier, $items=array()) {
141
+		return $this->addHtmlComponent(new HtmlMenu($identifier, $items));
142 142
 	}
143 143
 
144 144
 	/**Adds an icon menu
145 145
 	 * @param string $identifier
146 146
 	 * @param array $items icons
147 147
 	 */
148
-	public function htmlIconMenu($identifier,$items=array()){
149
-		return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items));
148
+	public function htmlIconMenu($identifier, $items=array()) {
149
+		return $this->addHtmlComponent(new HtmlIconMenu($identifier, $items));
150 150
 	}
151 151
 
152 152
 	/**Adds an labeled icon menu
153 153
 	 * @param string $identifier
154 154
 	 * @param array $items icons
155 155
 	 */
156
-	public function htmlLabeledIconMenu($identifier,$items=array()){
157
-		return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items));
156
+	public function htmlLabeledIconMenu($identifier, $items=array()) {
157
+		return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier, $items));
158 158
 	}
159 159
 
160 160
 	/**
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 	 * @param string $value
163 163
 	 * @param array $items
164 164
 	 */
165
-	public function htmlDropdown($identifier, $value="", $items=array()){
166
-		return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items));
165
+	public function htmlDropdown($identifier, $value="", $items=array()) {
166
+		return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items));
167 167
 	}
168 168
 
169 169
 	/**
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 	 * @param string $identifier
172 172
 	 * @param string $content
173 173
 	 */
174
-	public function htmlMessage($identifier, $content=""){
175
-		return $this->addHtmlComponent(new HtmlMessage($identifier,$content));
174
+	public function htmlMessage($identifier, $content="") {
175
+		return $this->addHtmlComponent(new HtmlMessage($identifier, $content));
176 176
 	}
177 177
 
178 178
 	/**
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 	 * @param string $identifier
181 181
 	 * @param string $content
182 182
 	 */
183
-	public function htmlSegment($identifier, $content=""){
184
-		return $this->addHtmlComponent(new HtmlSegment($identifier,$content));
183
+	public function htmlSegment($identifier, $content="") {
184
+		return $this->addHtmlComponent(new HtmlSegment($identifier, $content));
185 185
 	}
186 186
 
187 187
 	/**
@@ -189,16 +189,16 @@  discard block
 block discarded – undo
189 189
 	 * @param string $identifier
190 190
 	 * @param array $items the segments
191 191
 	 */
192
-	public function htmlSegmentGroups($identifier, $items=array()){
193
-		return $this->addHtmlComponent(new HtmlSegmentGroups($identifier,$items));
192
+	public function htmlSegmentGroups($identifier, $items=array()) {
193
+		return $this->addHtmlComponent(new HtmlSegmentGroups($identifier, $items));
194 194
 	}
195 195
 
196 196
 	/**
197 197
 	 * @param string $identifier
198 198
 	 * @param mixed $content
199 199
 	 */
200
-	public function htmlPopup(BaseHtml $container,$identifier,$content){
201
-		return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content));
200
+	public function htmlPopup(BaseHtml $container, $identifier, $content) {
201
+		return $this->addHtmlComponent(new HtmlPopup($container, $identifier, $content));
202 202
 	}
203 203
 
204 204
 	/**
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
 	 * @param boolean $createCols
209 209
 	 * @param boolean $implicitRows
210 210
 	 */
211
-	public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
212
-		return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows));
211
+	public function htmlGrid($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) {
212
+		return $this->addHtmlComponent(new HtmlGrid($identifier, $numRows, $numCols, $createCols, $implicitRows));
213 213
 	}
214 214
 
215 215
 	/**
@@ -218,19 +218,19 @@  discard block
 block discarded – undo
218 218
 	 * @param mixed $content
219 219
 	 * @param string $type
220 220
 	 */
221
-	public function htmlHeader($identifier,$niveau=1,$content=NULL,$type="page"){
222
-		return $this->addHtmlComponent(new HtmlHeader($identifier,$niveau,$content,$type));
221
+	public function htmlHeader($identifier, $niveau=1, $content=NULL, $type="page") {
222
+		return $this->addHtmlComponent(new HtmlHeader($identifier, $niveau, $content, $type));
223 223
 	}
224 224
 
225
-	public function htmlInput($identifier,$type="text",$value="",$placeholder=""){
226
-		return $this->addHtmlComponent(new HtmlInput($identifier,$type,$value,$placeholder));
225
+	public function htmlInput($identifier, $type="text", $value="", $placeholder="") {
226
+		return $this->addHtmlComponent(new HtmlInput($identifier, $type, $value, $placeholder));
227 227
 	}
228 228
 
229
-	public function htmlList($identifier,$items=array()){
230
-		return $this->addHtmlComponent(new HtmlList($identifier,$items));
229
+	public function htmlList($identifier, $items=array()) {
230
+		return $this->addHtmlComponent(new HtmlList($identifier, $items));
231 231
 	}
232 232
 
233
-	public function htmlBreadcrumb( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){
234
-		return $this->addHtmlComponent(new HtmlBreadcrumb($identifier,$items,$autoActive,$startIndex,$hrefFunction));
233
+	public function htmlBreadcrumb($identifier, $items=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) {
234
+		return $this->addHtmlComponent(new HtmlBreadcrumb($identifier, $items, $autoActive, $startIndex, $hrefFunction));
235 235
 	}
236 236
 }
237 237
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,42 +17,42 @@
 block discarded – undo
17 17
 	use BaseTrait;
18 18
 	protected $_popup=NULL;
19 19
 
20
-	public function __construct($identifier, $tagName="p",$baseClass="ui",$content=NULL) {
20
+	public function __construct($identifier, $tagName="p", $baseClass="ui", $content=NULL) {
21 21
 		parent::__construct($identifier, $tagName);
22 22
 		$this->_baseClass=$baseClass;
23 23
 		$this->setClass($baseClass);
24
-		if(isset($content)){
24
+		if (isset($content)) {
25 25
 			$this->content=$content;
26 26
 		}
27 27
 	}
28 28
 
29
-	public function setPopupAttributes($variation=NULL,$popupEvent=NULL){
30
-		if(isset($this->_popup))
31
-			$this->_popup->setAttributes($variation,$popupEvent);
29
+	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
30
+		if (isset($this->_popup))
31
+			$this->_popup->setAttributes($variation, $popupEvent);
32 32
 	}
33 33
 
34
-	public function addPopup($title="",$content="",$variation=NULL,$params=array()){
35
-		$this->_popup=new InternalPopup($this,$title,$content,$variation,$params);
34
+	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
35
+		$this->_popup=new InternalPopup($this, $title, $content, $variation, $params);
36 36
 		return $this;
37 37
 	}
38 38
 
39
-	public function addPopupHtml($html="",$variation=NULL,$params=array()){
39
+	public function addPopupHtml($html="", $variation=NULL, $params=array()) {
40 40
 		$this->_popup=new InternalPopup($this);
41 41
 		$this->_popup->setHtml($html);
42
-		$this->_popup->setAttributes($variation,$params);
42
+		$this->_popup->setAttributes($variation, $params);
43 43
 		return $this;
44 44
 	}
45 45
 
46
-	public function compile(JsUtils $js=NULL, View $view=NULL){
47
-		if(isset($this->_popup))
46
+	public function compile(JsUtils $js=NULL, View $view=NULL) {
47
+		if (isset($this->_popup))
48 48
 			$this->_popup->compile();
49
-		return parent::compile($js,$view);
49
+		return parent::compile($js, $view);
50 50
 	}
51
-	public function run(JsUtils $js){
51
+	public function run(JsUtils $js) {
52 52
 		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
53 53
 		parent::run($js);
54 54
 		$this->addEventsOnRun($js);
55
-		if(isset($this->_popup)){
55
+		if (isset($this->_popup)) {
56 56
 			$this->_popup->run($js);
57 57
 		}
58 58
 		return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlMenuItem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 
8 8
 class HtmlListItem extends HtmlSemDoubleElement {
9 9
 	protected $image;
10
-	public function __construct($identifier,$content) {
10
+	public function __construct($identifier, $content) {
11 11
 		parent::__construct($identifier, "div", "item");
12 12
 		$this->_template='<%tagName% id="%identifier%" %properties%>%image%%content%</%tagName%>';
13 13
 		$this->content=$content;
14 14
 	}
15
-	public function addIcon($icon){
15
+	public function addIcon($icon) {
16 16
 		$content=$this->content;
17
-		$this->content=new HtmlSemDoubleElement("content-".$this->identifier,"div","content");
17
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content");
18 18
 		$this->content->setContent($content);
19
-		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon),true);
19
+		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon), true);
20 20
 	}
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.