Completed
Push — master ( fcfed5...b7a7dd )
by Jean-Christophe
03:28
created
Ajax/semantic/html/base/constants/TextAlignment.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
 class TextAlignment extends BaseEnum {
8
-	const LEFT="left aligned",CENTER="center aligned",RIGHT="right aligned",JUSTIFIED="justified";
8
+	const LEFT="left aligned", CENTER="center aligned", RIGHT="right aligned", JUSTIFIED="justified";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/CheckboxType.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 CheckboxType extends BaseEnum {
8
-	const STANDARD="",TOGGLE="toggle",SLIDER="slider";
8
+	const STANDARD="", TOGGLE="toggle", SLIDER="slider";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Wide.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 Wide extends BaseEnum {
5
-	const W1="one", W2="two", W3="three", W4="four",W5="five", W6="six", W7="seven", W8="eight",W9="nine",W10="ten",W11="eleven",W12="twelve",W13="thirteen",W14="fourteen",W15="fifteen",W16="sixteen";
5
+	const W1="one", W2="two", W3="three", W4="four", W5="five", W6="six", W7="seven", W8="eight", W9="nine", W10="ten", W11="eleven", W12="twelve", W13="thirteen", W14="fourteen", W15="fifteen", W16="sixteen";
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Direction.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 Direction extends BaseEnum {
5
-	const RIGHT="right", LEFT="left",DOWN="down",UP="up",NONE="",BELOW="below";
5
+	const RIGHT="right", LEFT="left", DOWN="down", UP="up", NONE="", BELOW="below";
6 6
 }
7 7
\ No newline at end of file
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";
5
+	const FACEBOOK="facebook", TWITTER="twitter", GOOGLEPLUS="google plus", VK="vk", LINKEDIN="linkedin", INSTAGRAM="instagram", YOUTUBE="youtube";
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
  * @author jc
11 11
  * @version 1.001
12 12
  */
13
-abstract class HtmlSemCollection extends HtmlCollection{
13
+abstract class HtmlSemCollection extends HtmlCollection {
14 14
 	use BaseTrait;
15
-	public function __construct( $identifier, $tagName="div",$baseClass=""){
16
-		parent::__construct( $identifier, $tagName);
15
+	public function __construct($identifier, $tagName="div", $baseClass="") {
16
+		parent::__construct($identifier, $tagName);
17 17
 		$this->_baseClass=$baseClass;
18 18
 		$this->setClass($baseClass);
19 19
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlModal.php 2 patches
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
 			foreach ($actions as $action){
44 44
 				$this->addAction($action);
45 45
 			}
46
-		}
47
-		else{
46
+		} else{
48 47
 			$this->addAction($actions);
49 48
 		}
50 49
 		return $this;
@@ -60,8 +59,9 @@  discard block
 block discarded – undo
60 59
 				$class="cancel";
61 60
 			}
62 61
 			$action=new HtmlButton("action-".$this->identifier,$action);
63
-			if($class!=="")
64
-				$action->addToProperty("class", $class);
62
+			if($class!=="") {
63
+							$action->addToProperty("class", $class);
64
+			}
65 65
 		}
66 66
 		return $this->addElementInPart($action, "actions");
67 67
 	}
@@ -169,8 +169,9 @@  discard block
 block discarded – undo
169 169
 	 * @see BaseHtml::run()
170 170
 	 */
171 171
 	public function run(JsUtils $js) {
172
-		if(isset($this->_bsComponent)===false)
173
-			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
172
+		if(isset($this->_bsComponent)===false) {
173
+					$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
174
+		}
174 175
 		$this->addEventsOnRun($js);
175 176
 		return $this->_bsComponent;
176 177
 	}
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -15,117 +15,117 @@  discard block
 block discarded – undo
15 15
 	protected $_paramParts=array();
16 16
 
17 17
 	public function __construct($identifier, $header="", $content="", $actions=null) {
18
-		parent::__construct($identifier, "div","ui modal");
19
-		if(isset($header)){
18
+		parent::__construct($identifier, "div", "ui modal");
19
+		if (isset($header)) {
20 20
 			$this->setHeader($header);
21 21
 		}
22
-		if(isset($content)){
22
+		if (isset($content)) {
23 23
 			$this->setContent($content);
24 24
 		}
25
-		if(isset($actions)){
25
+		if (isset($actions)) {
26 26
 			$this->setActions($actions);
27 27
 		}
28 28
 	}
29 29
 
30 30
 	public function setHeader($value) {
31
-		$this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value);
31
+		$this->content["header"]=new HtmlSemDoubleElement("header-".$this->identifier, "a", "header", $value);
32 32
 		return $this;
33 33
 	}
34 34
 
35 35
 	public function setContent($value) {
36
-		$this->content["content"]=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content", $value);
36
+		$this->content["content"]=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content", $value);
37 37
 		return $this;
38 38
 	}
39 39
 
40 40
 	public function setActions($actions) {
41
-		$this->content["actions"]=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "actions");
42
-		if(\is_array($actions)){
43
-			foreach ($actions as $action){
41
+		$this->content["actions"]=new HtmlSemDoubleElement("content-".$this->identifier, "div", "actions");
42
+		if (\is_array($actions)) {
43
+			foreach ($actions as $action) {
44 44
 				$this->addAction($action);
45 45
 			}
46 46
 		}
47
-		else{
47
+		else {
48 48
 			$this->addAction($actions);
49 49
 		}
50 50
 		return $this;
51 51
 	}
52 52
 
53
-	public function addAction($action){
54
-		if(!$action instanceof BaseHtml){
53
+	public function addAction($action) {
54
+		if (!$action instanceof BaseHtml) {
55 55
 			$class="";
56
-			if(\array_search($action, ["Okay","Yes"])!==false){
56
+			if (\array_search($action, ["Okay", "Yes"])!==false) {
57 57
 				$class="approve";
58 58
 			}
59
-			if(\array_search($action, ["Close","Cancel","No"])!==false){
59
+			if (\array_search($action, ["Close", "Cancel", "No"])!==false) {
60 60
 				$class="cancel";
61 61
 			}
62
-			$action=new HtmlButton("action-".$this->identifier,$action);
63
-			if($class!=="")
62
+			$action=new HtmlButton("action-".$this->identifier, $action);
63
+			if ($class!=="")
64 64
 				$action->addToProperty("class", $class);
65 65
 		}
66 66
 		return $this->addElementInPart($action, "actions");
67 67
 	}
68 68
 
69
-	public function addContent($content,$before=false){
70
-		$this->content["content"]->addContent($content,$before);
69
+	public function addContent($content, $before=false) {
70
+		$this->content["content"]->addContent($content, $before);
71 71
 		return $this;
72 72
 	}
73 73
 
74
-	public function addImageContent($image,$description=NULL){
74
+	public function addImageContent($image, $description=NULL) {
75 75
 		$content=$this->content["content"];
76
-		if(isset($description)){
77
-			$description=new HtmlSemDoubleElement("description-".$this->identifier,"div","description",$description);
78
-			$content->addContent($description,true);
76
+		if (isset($description)) {
77
+			$description=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $description);
78
+			$content->addContent($description, true);
79 79
 		}
80
-		if($image!==""){
81
-			$img=new HtmlImage("image-".$this->identifier,$image,"","medium");
82
-			$content->addContent($img,true);
83
-			$content->addToProperty("class","image");
80
+		if ($image!=="") {
81
+			$img=new HtmlImage("image-".$this->identifier, $image, "", "medium");
82
+			$content->addContent($img, true);
83
+			$content->addToProperty("class", "image");
84 84
 		}
85 85
 		return $this;
86 86
 	}
87 87
 
88
-	public function addIconContent($icon,$description=NULL){
88
+	public function addIconContent($icon, $description=NULL) {
89 89
 		$content=$this->content["content"];
90
-		if(isset($description)){
91
-			$description=new HtmlSemDoubleElement("description-".$this->identifier,"div","description",$description);
92
-			$content->addContent($description,true);
90
+		if (isset($description)) {
91
+			$description=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $description);
92
+			$content->addContent($description, true);
93 93
 		}
94
-		if($icon!==""){
95
-			$img=new HtmlIcon("image-".$this->identifier,$icon);
96
-			$content->addContent($img,true);
97
-			$content->addToProperty("class","image");
94
+		if ($icon!=="") {
95
+			$img=new HtmlIcon("image-".$this->identifier, $icon);
96
+			$content->addContent($img, true);
97
+			$content->addToProperty("class", "image");
98 98
 		}
99 99
 		return $this;
100 100
 	}
101 101
 
102
-	private function addContentInPart($content,$uiClass,$part) {
103
-		return $this->addElementInPart(new HtmlSemDoubleElement($part."-" . $this->identifier, "div", $uiClass, $content), $part);
102
+	private function addContentInPart($content, $uiClass, $part) {
103
+		return $this->addElementInPart(new HtmlSemDoubleElement($part."-".$this->identifier, "div", $uiClass, $content), $part);
104 104
 	}
105 105
 
106
-	private function addElementInPart($element,$part) {
106
+	private function addElementInPart($element, $part) {
107 107
 		$this->content[$part]->addContent($element);
108 108
 		return $element;
109 109
 	}
110 110
 
111
-	public function showDimmer($value){
112
-		$value=$value?"show":"hide";
111
+	public function showDimmer($value) {
112
+		$value=$value ? "show" : "hide";
113 113
 		$this->_paramParts[]=["'".$value." dimmer'"];
114 114
 		return $this;
115 115
 	}
116 116
 
117
-	public function setInverted($recursive=true){
117
+	public function setInverted($recursive=true) {
118 118
 		$this->_params["inverted"]=true;
119 119
 		return $this;
120 120
 	}
121 121
 
122
-	public function setBasic(){
122
+	public function setBasic() {
123 123
 		return $this->addToProperty("class", "basic");
124 124
 	}
125 125
 
126 126
 
127
-	public function setTransition($value){
128
-		$this->_paramParts[]=["'setting'","'transition'","'".$value."'"];
127
+	public function setTransition($value) {
128
+		$this->_paramParts[]=["'setting'", "'transition'", "'".$value."'"];
129 129
 	}
130 130
 
131 131
 	/**
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 	 * @param string $viewName
136 136
 	 * @param $params The parameters to pass to the view
137 137
 	 */
138
-	public function renderView(JsUtils $js,$initialController,$viewName, $params=array()) {
139
-		return $this->setContent($js->renderContent($initialController, $viewName,$params));
138
+	public function renderView(JsUtils $js, $initialController, $viewName, $params=array()) {
139
+		return $this->setContent($js->renderContent($initialController, $viewName, $params));
140 140
 	}
141 141
 
142 142
 	/**
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 	 * @param string $actionName the action name
148 148
 	 * @param array $params
149 149
 	 */
150
-	public function forward(JsUtils $js,$initialControllerInstance,$controllerName,$actionName,$params=NULL){
151
-		return $this->setContent($js->forward($initialControllerInstance, $controllerName, $actionName,$params));
150
+	public function forward(JsUtils $js, $initialControllerInstance, $controllerName, $actionName, $params=NULL) {
151
+		return $this->setContent($js->forward($initialControllerInstance, $controllerName, $actionName, $params));
152 152
 	}
153 153
 
154 154
 	/**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
159 159
 	 */
160 160
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
161
-		$this->content=JArray::sortAssociative($this->content, ["header","content","actions" ]);
161
+		$this->content=JArray::sortAssociative($this->content, ["header", "content", "actions"]);
162 162
 		return parent::compile($js, $view);
163 163
 	}
164 164
 	/*
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
 	 * @see BaseHtml::run()
167 167
 	 */
168 168
 	public function run(JsUtils $js) {
169
-		if(isset($this->_bsComponent)===false)
170
-			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
169
+		if (isset($this->_bsComponent)===false)
170
+			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier, $this->_params, $this->_paramParts);
171 171
 		$this->addEventsOnRun($js);
172 172
 		return $this->_bsComponent;
173 173
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlSegment.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
  * @version 1.001
19 19
  */
20 20
 class HtmlSegment extends HtmlSemDoubleElement {
21
-	use AttachedTrait,TextAlignmentTrait;
21
+	use AttachedTrait, TextAlignmentTrait;
22 22
 
23 23
 	public function __construct($identifier, $content="") {
24 24
 		parent::__construct($identifier, "div", "ui segment");
25
-		$this->_variations=\array_merge($this->_variations, [ Variation::PADDED,Variation::COMPACT ]);
26
-		$this->_states=\array_merge($this->_states, [ State::LOADING ]);
25
+		$this->_variations=\array_merge($this->_variations, [Variation::PADDED, Variation::COMPACT]);
26
+		$this->_states=\array_merge($this->_states, [State::LOADING]);
27 27
 		$this->content=$content;
28 28
 	}
29 29
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public function setSens($sens="vertical") {
40
-		return $this->addToPropertyCtrl("class", $sens, array ("vertical","horizontal" ));
40
+		return $this->addToPropertyCtrl("class", $sens, array("vertical", "horizontal"));
41 41
 	}
42 42
 
43 43
 	public function setEmphasis($value=Emphasis::SECONDARY) {
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
 	}
62 62
 
63 63
 	public function asContainer() {
64
-		return $this->addToPropertyCtrl("class", "container", array ("container" ));
64
+		return $this->addToPropertyCtrl("class", "container", array("container"));
65 65
 	}
66 66
 
67
-	public function addGrid($numRows=1, $numCols=NULL){
68
-		$grid=new HtmlGrid("Grid-".$this->identifier,$numRows,$numCols);
67
+	public function addGrid($numRows=1, $numCols=NULL) {
68
+		$grid=new HtmlGrid("Grid-".$this->identifier, $numRows, $numCols);
69 69
 		$this->content=$grid;
70 70
 		return $grid;
71 71
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@  discard block
 block discarded – undo
12 12
 		$image=new HtmlImg("img-", $src, $alt);
13 13
 		$image->setClass("");
14 14
 		parent::__construct($identifier, "div", "ui image", $image);
15
-		if (isset($size))
16
-			$this->setSize($size);
15
+		if (isset($size)) {
16
+					$this->setSize($size);
17
+		}
17 18
 	}
18 19
 
19 20
 	public function setCircular() {
@@ -21,8 +22,9 @@  discard block
 block discarded – undo
21 22
 	}
22 23
 
23 24
 	public function asAvatar($caption=NULL) {
24
-		if (isset($caption))
25
-			$this->wrap("", $caption);
25
+		if (isset($caption)) {
26
+					$this->wrap("", $caption);
27
+		}
26 28
 		return $this->addToProperty("class", "avatar");
27 29
 	}
28 30
 
Please login to merge, or discard this patch.