Completed
Push — master ( 299fb1...80f966 )
by Jean-Christophe
03:11
created
Ajax/semantic/html/elements/html5/HtmlLink.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
 	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::run()
22 22
 	 */
23 23
 	public function run(JsUtils $js) {
24
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
24
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
25 25
 		$this->addEventsOnRun($js);
26 26
 		return $this->_bsComponent;
27 27
 	}
28 28
 
29 29
 	public function addIcon($icon, $before=true) {
30
-		return $this->addContent(new HtmlIcon("icon-" . $this->identifier, $icon), $before);
30
+		return $this->addContent(new HtmlIcon("icon-".$this->identifier, $icon), $before);
31 31
 	}
32 32
 
33 33
 	public static function icon($identifier, $icon, $href="#", $label=NULL) {
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
25 25
 	 */
26 26
 	public function setPointing($value=Direction::NONE) {
27
-		if($value==="left" || $value==="right")
27
+		if ($value==="left" || $value==="right")
28 28
 			return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
29 29
 		else
30
-			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
30
+			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing", true));
31 31
 	}
32 32
 
33 33
 	/**
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
37 37
 	 */
38 38
 	public function toCorner($side="left") {
39
-		return $this->addToPropertyCtrl("class", $side . " corner", array ("right corner","left corner" ));
39
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
40 40
 	}
41 41
 
42
-	public function setHorizontal(){
43
-		return $this->addToPropertyCtrl("class", "hozizontal",array("horizontal"));
42
+	public function setHorizontal() {
43
+		return $this->addToPropertyCtrl("class", "hozizontal", array("horizontal"));
44 44
 	}
45 45
 
46
-	public function setFloating(){
47
-		return $this->addToPropertyCtrl("class", "floating",array("floating"));
46
+	public function setFloating() {
47
+		return $this->addToPropertyCtrl("class", "floating", array("floating"));
48 48
 	}
49 49
 
50 50
 	/**
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 		return $this->addToProperty("class", "tag");
56 56
 	}
57 57
 
58
-	public function setEmpty(){
58
+	public function setEmpty() {
59 59
 		$this->content=NULL;
60
-		return $this->addToPropertyCtrl("class", "empty",array("empty"));
60
+		return $this->addToPropertyCtrl("class", "empty", array("empty"));
61 61
 	}
62 62
 
63 63
 	public function setBasic() {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function addEmphasisImage($src, $alt="", $before=true) {
75 75
 		$this->addToProperty("class", "image");
76
-		return $this->addImage($src,$alt,$before);
76
+		return $this->addImage($src, $alt, $before);
77 77
 	}
78 78
 
79 79
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @return \Ajax\semantic\html\elements\html5\HtmlImg
85 85
 	 */
86 86
 	public function addAvatarImage($src, $alt="", $before=true) {
87
-		$img=$this->addImage($src,$alt,$before);
87
+		$img=$this->addImage($src, $alt, $before);
88 88
 		$img->setClass("ui image");
89 89
 		$img->asAvatar();
90 90
 		return $img;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	* @return \Ajax\semantic\html\elements\html5\HtmlImg
99 99
 	*/
100 100
 	public function addImage($src, $alt="", $before=true) {
101
-		$img=new HtmlImg("image-" . $this->identifier, $src, $alt);
101
+		$img=new HtmlImg("image-".$this->identifier, $src, $alt);
102 102
 		$img->setClass("");
103 103
 		$this->addContent($img, $before);
104 104
 		return $img;
@@ -110,21 +110,21 @@  discard block
 block discarded – undo
110 110
 	 * @return \Ajax\common\html\HtmlDoubleElement
111 111
 	 */
112 112
 	public function addDetail($detail) {
113
-		$div=new HtmlSemDoubleElement("detail-" . $this->identifier, $this->tagName,"detail");
113
+		$div=new HtmlSemDoubleElement("detail-".$this->identifier, $this->tagName, "detail");
114 114
 		$div->setContent($detail);
115 115
 		$this->addContent($div);
116 116
 		return $div;
117 117
 	}
118 118
 
119 119
 	public function asRibbon($direction=Direction::NONE) {
120
-		return $this->addToPropertyCtrl("class", $direction." ribbon", array ("ribbon","right ribbon","left ribbon" ));
120
+		return $this->addToPropertyCtrl("class", $direction." ribbon", array("ribbon", "right ribbon", "left ribbon"));
121 121
 	}
122 122
 
123
-	public function setAttached($side=Side::TOP,$direction=Direction::NONE){
124
-		if($direction!==Direction::NONE)
125
-			return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
123
+	public function setAttached($side=Side::TOP, $direction=Direction::NONE) {
124
+		if ($direction!==Direction::NONE)
125
+			return $this->addToPropertyCtrl("class", $side." ".$direction." attached", Side::getConstantValues($direction." attached"));
126 126
 		else
127
-			return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
127
+			return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached"));
128 128
 	}
129 129
 
130 130
 	public static function ribbon($identifier, $caption) {
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlIcon.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * @return \Ajax\semantic\html\HtmlIcon
69 69
 	 */
70 70
 	public function setFlipped($sens="horizontally") {
71
-		return $this->addToProperty("class", "flipped " . $sens);
71
+		return $this->addToProperty("class", "flipped ".$sens);
72 72
 	}
73 73
 
74 74
 	/**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * @return \Ajax\semantic\html\HtmlIcon
78 78
 	 */
79 79
 	public function setRotated($sens="clockwise") {
80
-		return $this->addToProperty("class", "rotated " . $sens);
80
+		return $this->addToProperty("class", "rotated ".$sens);
81 81
 	}
82 82
 
83 83
 	/**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function asLink($href=NULL) {
88 88
 		if (isset($href)) {
89
-			$this->wrap("<a href='" . $href . "'>", "</a>");
89
+			$this->wrap("<a href='".$href."'>", "</a>");
90 90
 		}
91 91
 		return $this->addToProperty("class", "link");
92 92
 	}
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function setBordered($inverted=false) {
104 104
 		$invertedStr="";
105
-		if ($inverted !== false)
105
+		if ($inverted!==false)
106 106
 			$invertedStr=" inverted";
107
-		return $this->addToProperty("class", "bordered" . $invertedStr);
107
+		return $this->addToProperty("class", "bordered".$invertedStr);
108 108
 	}
109 109
 
110 110
 	/**
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 	}
117 117
 
118 118
 	public function addLabel($label, $before=false, $icon=NULL) {
119
-		if($before)
119
+		if ($before)
120 120
 			$this->wrap($label);
121 121
 		else
122 122
 			$this->wrap("", $label);
123
-		if(isset($icon))
123
+		if (isset($icon))
124 124
 			$this->addToIcon($icon);
125 125
 		return $this;
126 126
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
 
19 19
 	protected function createItem($value) {
20 20
 		$count=$this->count();
21
-		$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
21
+		$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
22 22
 		return $item;
23 23
 	}
24 24
 
25 25
 	public function addHeader($niveau, $content) {
26
-		$header=new HtmlHeader("header-" . $this->identifier, $niveau, $content, "page");
26
+		$header=new HtmlHeader("header-".$this->identifier, $niveau, $content, "page");
27 27
 		$this->wrap($header);
28 28
 		return $header;
29 29
 	}
30 30
 
31
-	public function getItemPart($index,$partName="header"){
31
+	public function getItemPart($index, $partName="header") {
32 32
 		return $this->getItem($index)->getPart($partName);
33 33
 	}
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public function asLink() {
40
-		$this->addToPropertyCtrl("class", "link", array ("link" ));
40
+		$this->addToPropertyCtrl("class", "link", array("link"));
41 41
 		return $this->contentAs("a");
42 42
 	}
43 43
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function run(JsUtils $js) {
63
-		if ($this->_hasCheckedList === true) {
64
-			$jsCode=include dirname(__FILE__) . '/../../components/jsTemplates/tplCheckedList.php';
65
-			$jsCode=\str_replace("%identifier%", "#" . $this->identifier, $jsCode);
63
+		if ($this->_hasCheckedList===true) {
64
+			$jsCode=include dirname(__FILE__).'/../../components/jsTemplates/tplCheckedList.php';
65
+			$jsCode=\str_replace("%identifier%", "#".$this->identifier, $jsCode);
66 66
 			$this->executeOnRun($jsCode);
67 67
 		}
68 68
 		return parent::run($js);
@@ -86,24 +86,24 @@  discard block
 block discarded – undo
86 86
 
87 87
 	public function addCheckedList($items=array(), $masterItem=NULL, $values=array()) {
88 88
 		$count=$this->count();
89
-		$identifier=$this->identifier . "-" . $count;
89
+		$identifier=$this->identifier."-".$count;
90 90
 		if (isset($masterItem)) {
91
-			$masterO=new HtmlFormCheckbox("master-" . $identifier, $masterItem);
91
+			$masterO=new HtmlFormCheckbox("master-".$identifier, $masterItem);
92 92
 			$masterO->getField()->addToProperty("class", "master");
93 93
 			$masterO->setClass("item");
94 94
 			$this->addItem($masterO);
95 95
 		}
96
-		$fields=array ();
96
+		$fields=array();
97 97
 		$i=0;
98
-		foreach ( $items as $val => $caption ) {
99
-			$itemO=new HtmlFormCheckbox($identifier . "-" . $i++, $caption, $val, "child");
100
-			if (\array_search($val, $values) !== false) {
98
+		foreach ($items as $val => $caption) {
99
+			$itemO=new HtmlFormCheckbox($identifier."-".$i++, $caption, $val, "child");
100
+			if (\array_search($val, $values)!==false) {
101 101
 				$itemO->getField()->getField()->setProperty("checked", "");
102 102
 			}
103 103
 			$itemO->setClass("item");
104 104
 			$fields[]=$itemO;
105 105
 		}
106
-		if (isset($masterO) === true) {
106
+		if (isset($masterO)===true) {
107 107
 			$list=new HtmlList("", $fields);
108 108
 			$list->setClass("list");
109 109
 			$masterO->addContent($list);
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlIconGroups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			$icon=JArray::getValue($value, "icon", 0);
26 26
 			$size=JArray::getValue($value, "size", 1);
27 27
 		}
28
-		$iconO=new HtmlIcon("icon-" . $this->identifier, $icon);
28
+		$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
29 29
 		if (isset($size)) {
30 30
 			$iconO->setSize($size);
31 31
 		}
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	protected function createCondition($value) {
36
-		return ($value instanceof HtmlIcon) === false;
36
+		return ($value instanceof HtmlIcon)===false;
37 37
 	}
38 38
 
39 39
 	public function getIcon($index) {
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlReveal.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,64 +10,64 @@
 block discarded – undo
10 10
 
11 11
 class HtmlReveal extends HtmlSemDoubleElement {
12 12
 
13
-	public function __construct($identifier, $visibleContent,$hiddenContent,$type=RevealType::FADE,$attributeType=NULL) {
13
+	public function __construct($identifier, $visibleContent, $hiddenContent, $type=RevealType::FADE, $attributeType=NULL) {
14 14
 		parent::__construct($identifier, "div", "ui reveal");
15 15
 		$this->setElement(0, $visibleContent);
16 16
 		$this->setElement(1, $hiddenContent);
17
-		$this->setType($type,$attributeType);
17
+		$this->setType($type, $attributeType);
18 18
 	}
19 19
 
20
-	private function setElement($index,$content){
21
-		if(!$content instanceof HtmlSingleElement){
22
-			$content=new HtmlLabel("",$content);
20
+	private function setElement($index, $content) {
21
+		if (!$content instanceof HtmlSingleElement) {
22
+			$content=new HtmlLabel("", $content);
23 23
 		}
24
-		if($content instanceof HtmlSemDoubleElement){
25
-			$content=new HtmlSemDoubleElement($this->identifier."-".$index,"div","",$content);
26
-		}elseif ($content instanceof HtmlImg){
24
+		if ($content instanceof HtmlSemDoubleElement) {
25
+			$content=new HtmlSemDoubleElement($this->identifier."-".$index, "div", "", $content);
26
+		}elseif ($content instanceof HtmlImg) {
27 27
 			$this->addToPropertyCtrl("class", "image", array("image"));
28 28
 		}
29
-		$content->addToProperty("class",(($index===0)?"visible":"hidden")." content");
29
+		$content->addToProperty("class", (($index===0) ? "visible" : "hidden")." content");
30 30
 		$this->content[$index]=$content;
31 31
 		return $this;
32 32
 	}
33 33
 
34
-	public function setVisibleContent($visibleContent){
34
+	public function setVisibleContent($visibleContent) {
35 35
 		return $this->setElement(0, $visibleContent);
36 36
 	}
37 37
 
38
-	public function setHiddenContent($hiddenContent){
38
+	public function setHiddenContent($hiddenContent) {
39 39
 		return $this->setElement(1, $hiddenContent);
40 40
 	}
41 41
 
42
-	public function getVisibleContent(){
42
+	public function getVisibleContent() {
43 43
 		return $this->content[0];
44 44
 	}
45 45
 
46
-	public function getHiddenContent(){
46
+	public function getHiddenContent() {
47 47
 		return $this->content[1];
48 48
 	}
49 49
 
50
-	public function setType($type,$attribute=NULL){
50
+	public function setType($type, $attribute=NULL) {
51 51
 		$this->addToPropertyCtrl("class", $type, RevealType::getConstants());
52
-		if(isset($attribute)){
52
+		if (isset($attribute)) {
53 53
 			$this->addToPropertyCtrl("class", $attribute, Direction::getConstants());
54 54
 		}
55 55
 		return $this;
56 56
 	}
57 57
 
58
-	public function setFade($attribute=NULL){
59
-		return $this->setType(RevealType::FADE,$attribute);
58
+	public function setFade($attribute=NULL) {
59
+		return $this->setType(RevealType::FADE, $attribute);
60 60
 	}
61 61
 
62
-	public function setMove($attribute=NULL){
63
-		return $this->setType(RevealType::MOVE,$attribute);
62
+	public function setMove($attribute=NULL) {
63
+		return $this->setType(RevealType::MOVE, $attribute);
64 64
 	}
65 65
 
66
-	public function setRotate($attribute=NULL){
67
-		return $this->setType(RevealType::ROTATE,$attribute);
66
+	public function setRotate($attribute=NULL) {
67
+		return $this->setType(RevealType::ROTATE, $attribute);
68 68
 	}
69 69
 
70
-	public function setCircular(){
70
+	public function setCircular() {
71 71
 		return $this->addToProperty("class", "circular");
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
 class HtmlContainer extends HtmlSemDoubleElement {
14 14
 	use TextAlignmentTrait;
15 15
 	public function __construct($identifier, $content="") {
16
-		parent::__construct($identifier, "div","ui container");
16
+		parent::__construct($identifier, "div", "ui container");
17 17
 		$this->content=$content;
18 18
 	}
19 19
 
20
-	public function asText(){
20
+	public function asText() {
21 21
 		return $this->addToProperty("class", "text");
22 22
 	}
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlHeader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@  discard block
 block discarded – undo
10 10
 use Ajax\semantic\html\base\traits\AttachedTrait;
11 11
 
12 12
 class HtmlHeader extends HtmlSemDoubleElement {
13
-	use TextAlignmentTrait,AttachedTrait;
13
+	use TextAlignmentTrait, AttachedTrait;
14 14
 	protected $image;
15 15
 
16 16
 	public function __construct($identifier, $niveau=1, $content=NULL, $type="page") {
17 17
 		parent::__construct($identifier, "div", "ui header");
18 18
 		$this->_template="<%tagName% %properties%>%image%%content%</%tagName%>";
19 19
 		if (isset($type)) {
20
-			if ($type == "page") {
20
+			if ($type=="page") {
21 21
 				$this->asPageHeader($niveau);
22 22
 			} else
23 23
 				$this->asContentHeader($niveau);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	}
27 27
 
28 28
 	public function asPageHeader($niveau) {
29
-		$this->tagName="h" . $niveau;
29
+		$this->tagName="h".$niveau;
30 30
 	}
31 31
 
32 32
 	public function asContentHeader($niveau) {
@@ -39,25 +39,25 @@  discard block
 block discarded – undo
39 39
 
40 40
 	public function asIcon($icon, $title, $subHeader=NULL) {
41 41
 		$this->addToProperty("class", "icon");
42
-		$this->image=new HtmlIcon("icon-" . $this->identifier, $icon);
42
+		$this->image=new HtmlIcon("icon-".$this->identifier, $icon);
43 43
 		return $this->asTitle($title, $subHeader);
44 44
 	}
45 45
 
46 46
 	public function asImage($src, $title, $subHeader=NULL) {
47
-		$this->image=new HtmlImg("img-" . $this->identifier, $src, $title);
47
+		$this->image=new HtmlImg("img-".$this->identifier, $src, $title);
48 48
 		return $this->asTitle($title, $subHeader);
49 49
 	}
50 50
 
51 51
 	public function asTitle($title, $subHeader=NULL) {
52 52
 		if (!\is_object($title)) {
53
-			$this->content=new HtmlDoubleElement("content-" . $this->identifier, "div");
53
+			$this->content=new HtmlDoubleElement("content-".$this->identifier, "div");
54 54
 			$this->content->setContent($title);
55 55
 		} else {
56 56
 			$this->content=$title;
57 57
 		}
58 58
 		$this->content->setClass("content");
59 59
 		if (isset($subHeader)) {
60
-			$sub=new HtmlDoubleElement("subheader-" . $this->identifier, "div");
60
+			$sub=new HtmlDoubleElement("subheader-".$this->identifier, "div");
61 61
 			$sub->setClass("sub header");
62 62
 			$sub->setContent($subHeader);
63 63
 			$this->content->addContent($sub);
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionMenuItem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 
6 6
 class HtmlAccordionMenuItem extends HtmlMenuItem {
7
-	public function __construct($identifier,$title,$content) {
8
-		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title,$content));
7
+	public function __construct($identifier, $title, $content) {
8
+		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title, $content));
9 9
 	}
10 10
 
11
-	public function setActive($value=true){
11
+	public function setActive($value=true) {
12 12
 		$this->content->setActive($value);
13 13
 		return $this;
14 14
 	}
Please login to merge, or discard this patch.