Completed
Push — master ( fdca69...db492e )
by Jean-Christophe
03:16
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/HtmlPopup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 class HtmlPopup extends HtmlSemDoubleElement {
13 13
 	private $_params;
14 14
 	private $_container;
15
-	public function __construct(BaseHtml $container,$identifier, $content="") {
15
+	public function __construct(BaseHtml $container, $identifier, $content="") {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->_container=$container;
18 18
 		$this->setClass("ui popup");
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 		$this->_params=array("on"=>"hover");
21 21
 	}
22 22
 
23
-	public function addList($items=array(),$header=NULL){
24
-		if(!$this->content instanceof HtmlGrid){
25
-			$this->content=new HtmlGrid("Grid-".$this->identifier,0);
23
+	public function addList($items=array(), $header=NULL) {
24
+		if (!$this->content instanceof HtmlGrid) {
25
+			$this->content=new HtmlGrid("Grid-".$this->identifier, 0);
26 26
 		}
27 27
 		$grid=$this->content;
28 28
 
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 		$colCount++;
31 31
 		$grid->setColsCount($colCount);
32 32
 
33
-		$list=new HtmlList("",$items);
33
+		$list=new HtmlList("", $items);
34 34
 		$list->asLink();
35
-		if(isset($header)){
36
-			$list->addHeader(4,$header);
35
+		if (isset($header)) {
36
+			$list->addHeader(4, $header);
37 37
 		}
38
-		$grid->getCell(0,$colCount-1)->setContent($list);
38
+		$grid->getCell(0, $colCount-1)->setContent($list);
39 39
 		$grid->setDivided()->setRelaxed(true);
40 40
 		return $list;
41 41
 	}
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 	/**
44 44
 	 * A popup can have no maximum width and continue to flow to fit its content
45 45
 	 */
46
-	public function setFlowing(){
46
+	public function setFlowing() {
47 47
 		return $this->addToProperty("class", "flowing");
48 48
 	}
49 49
 
50 50
 	/**
51 51
 	 * A popup can provide more basic formatting
52 52
 	 */
53
-	public function setBasic(){
53
+	public function setBasic() {
54 54
 		return $this->addToProperty("class", "basic");
55 55
 	}
56 56
 
@@ -58,22 +58,22 @@  discard block
 block discarded – undo
58 58
 	 * {@inheritDoc}
59 59
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
60 60
 	 */
61
-	public function run(JsUtils $js){
61
+	public function run(JsUtils $js) {
62 62
 		$this->_params["popup"]="#".$this->identifier;
63
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
63
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->_params);
64 64
 	}
65 65
 
66
-	public function setOn($event="click"){
66
+	public function setOn($event="click") {
67 67
 		$this->_params["on"]=$event;
68 68
 		return $this;
69 69
 	}
70 70
 
71
-	public function setInline($value=true){
71
+	public function setInline($value=true) {
72 72
 		$this->_params["inline"]=$value;
73 73
 		return $this;
74 74
 	}
75 75
 
76
-	public function setPosition($position){
76
+	public function setPosition($position) {
77 77
 		$this->_params["position"]=$position;
78 78
 		return $this;
79 79
 	}
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=array()) {
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, ["Cancel","No"])!==false){
59
+			if (\array_search($action, ["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(){
117
+	public function setInverted() {
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 $controllerName the controller name
148 148
 	 * @param string $actionName the action name
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/modules/HtmlRating.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	 * @param int $max
14 14
 	 * @param string $icon star or heart
15 15
 	 */
16
-	public function __construct($identifier, $value,$max=5,$icon="") {
16
+	public function __construct($identifier, $value, $max=5, $icon="") {
17 17
 		parent::__construct($identifier, "div", "ui {$icon} rating");
18 18
 		$this->setValue($value);
19 19
 		$this->setMax($max);
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 	 * {@inheritDoc}
24 24
 	 * @see \Ajax\common\html\HtmlDoubleElement::setValue()
25 25
 	 */
26
-	public function setValue($value){
26
+	public function setValue($value) {
27 27
 		$this->setProperty("data-rating", $value);
28 28
 	}
29 29
 
30
-	public function setMax($max){
30
+	public function setMax($max) {
31 31
 		$this->setProperty("data-max-rating", $max);
32 32
 	}
33 33
 
@@ -35,20 +35,20 @@  discard block
 block discarded – undo
35 35
 	 * {@inheritDoc}
36 36
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
37 37
 	 */
38
-	public function run(JsUtils $js){
38
+	public function run(JsUtils $js) {
39 39
 		parent::run($js);
40
-		return $js->semantic()->rating("#".$this->identifier,$this->_params);
40
+		return $js->semantic()->rating("#".$this->identifier, $this->_params);
41 41
 	}
42 42
 
43
-	public function asStar(){
43
+	public function asStar() {
44 44
 		return $this->setIcon();
45 45
 	}
46 46
 
47
-	public function asHeart(){
47
+	public function asHeart() {
48 48
 		return $this->setIcon("heart");
49 49
 	}
50 50
 
51
-	public function setIcon($icon="star"){
52
-		return $this->addToPropertyCtrl("class", $icon, ["star","heart",""]);
51
+	public function setIcon($icon="star") {
52
+		return $this->addToPropertyCtrl("class", $icon, ["star", "heart", ""]);
53 53
 	}
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.