Completed
Push — master ( 3cf661...c0f044 )
by Jean-Christophe
03:28
created
Ajax/semantic/html/collections/HtmlGrid.php 3 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,8 +101,9 @@  discard block
 block discarded – undo
101 101
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
102 102
 	 */
103 103
 	public function setPadded($value=NULL){
104
-		if(isset($value))
105
-			$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
104
+		if(isset($value)) {
105
+					$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
106
+		}
106 107
 		return $this->addToProperty("class", "padded");
107 108
 	}
108 109
 
@@ -124,8 +125,9 @@  discard block
 block discarded – undo
124 125
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
125 126
 	 */
126 127
 	protected function createItem($value){
127
-		if($this->_createCols===false)
128
-			$value=null;
128
+		if($this->_createCols===false) {
129
+					$value=null;
130
+		}
129 131
 		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing);
130 132
 		return $item;
131 133
 	}
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,11 @@  discard block
 block discarded – undo
19 19
 	private $_createCols;
20 20
 	private $_colSizing=true;
21 21
 	private $_implicitRows=false;
22
+
23
+	/**
24
+	 * @param string $identifier
25
+	 * @param integer $numCols
26
+	 */
22 27
 	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
23 28
 		parent::__construct( $identifier, "div");
24 29
 		$this->_implicitRows=$implicitRows;
@@ -51,7 +56,7 @@  discard block
 block discarded – undo
51 56
 	/**
52 57
 	 * return the row at $index
53 58
 	 * @param int $index
54
-	 * @return \Ajax\semantic\html\collections\HtmlGridRow
59
+	 * @return \Ajax\common\html\HtmlDoubleElement
55 60
 	 */
56 61
 	public function getRow($index){
57 62
 		return $this->getItem($index);
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,23 +15,23 @@  discard block
 block discarded – undo
15 15
  * @author jc
16 16
  * @version 1.001
17 17
  */
18
-class HtmlGrid extends HtmlSemCollection{
18
+class HtmlGrid extends HtmlSemCollection {
19 19
 	use TextAlignmentTrait;
20 20
 	private $_createCols;
21 21
 	private $_colSizing=true;
22 22
 	private $_implicitRows=false;
23
-	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
24
-		parent::__construct( $identifier, "div","ui grid");
23
+	public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) {
24
+		parent::__construct($identifier, "div", "ui grid");
25 25
 		$this->_implicitRows=$implicitRows;
26 26
 		$this->_createCols=$createCols;
27
-		if(isset($numCols)){
27
+		if (isset($numCols)) {
28 28
 			//if($this->_createCols){
29 29
 				$this->_colSizing=false;
30 30
 			//}
31 31
 			$cols=Wide::getConstants()["W".$numCols];
32
-			$this->addToProperty("class",$cols." column");
32
+			$this->addToProperty("class", $cols." column");
33 33
 		}
34
-		$this->setNumRows($numRows,$numCols);
34
+		$this->setNumRows($numRows, $numCols);
35 35
 	}
36 36
 
37 37
 	/**
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 	 * @param int $numCols
41 41
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
42 42
 	 */
43
-	public function setNumRows($numRows,$numCols=NULL){
43
+	public function setNumRows($numRows, $numCols=NULL) {
44 44
 		$count=$this->count();
45
-		for($i=$count;$i<$numRows;$i++){
45
+		for ($i=$count; $i<$numRows; $i++) {
46 46
 			$this->addItem($numCols);
47 47
 		}
48 48
 		return $this;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @param int $index
54 54
 	 * @return \Ajax\semantic\html\collections\HtmlGridRow
55 55
 	 */
56
-	public function getRow($index){
56
+	public function getRow($index) {
57 57
 		return $this->getItem($index);
58 58
 	}
59 59
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 	 * @param int $col
63 63
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
64 64
 	 */
65
-	public function getCell($row,$col){
65
+	public function getCell($row, $col) {
66 66
 		$row=$this->getItem($row);
67
-		if(isset($row)){
67
+		if (isset($row)) {
68 68
 			$col=$row->getItem($col);
69 69
 		}
70 70
 		return $col;
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 * @param boolean $vertically
76 76
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
77 77
 	 */
78
-	public function setDivided($vertically=false){
79
-		$value=($vertically===true)?"vertically divided":"divided";
78
+	public function setDivided($vertically=false) {
79
+		$value=($vertically===true) ? "vertically divided" : "divided";
80 80
 		return $this->addToProperty("class", $value);
81 81
 	}
82 82
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 * @param boolean $internal true for internal cells
86 86
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
87 87
 	 */
88
-	public function setCelled($internal=false){
89
-		$value=($internal===true)?"internal celled":"celled";
88
+	public function setCelled($internal=false) {
89
+		$value=($internal===true) ? "internal celled" : "celled";
90 90
 		return $this->addToProperty("class", $value);
91 91
 	}
92 92
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 * automatically resize all elements to split the available width evenly
95 95
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
96 96
 	 */
97
-	public function setEqualWidth(){
97
+	public function setEqualWidth() {
98 98
 		return $this->addToProperty("class", "equal width");
99 99
 	}
100 100
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 	 * @param string $value
104 104
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
105 105
 	 */
106
-	public function setPadded($value=NULL){
107
-		if(isset($value))
108
-			$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
106
+	public function setPadded($value=NULL) {
107
+		if (isset($value))
108
+			$this->addToPropertyCtrl("class", $value, array("vertically", "horizontally"));
109 109
 		return $this->addToProperty("class", "padded");
110 110
 	}
111 111
 
@@ -113,37 +113,37 @@  discard block
 block discarded – undo
113 113
 	 * @param boolean $very
114 114
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
115 115
 	 */
116
-	public function setRelaxed($very=false){
117
-		$value=($very===true)?"very relaxed":"relaxed";
116
+	public function setRelaxed($very=false) {
117
+		$value=($very===true) ? "very relaxed" : "relaxed";
118 118
 		return $this->addToProperty("class", $value);
119 119
 	}
120 120
 
121
-	public function setVerticalAlignment($value=VerticalAlignment::MIDDLE){
122
-		return $this->addToPropertyCtrl("class", $value." aligned",VerticalAlignment::getConstantValues("aligned"));
121
+	public function setVerticalAlignment($value=VerticalAlignment::MIDDLE) {
122
+		return $this->addToPropertyCtrl("class", $value." aligned", VerticalAlignment::getConstantValues("aligned"));
123 123
 	}
124 124
 
125 125
 	/**
126 126
 	 * {@inheritDoc}
127 127
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
128 128
 	 */
129
-	protected function createItem($value){
130
-		if($this->_createCols===false)
129
+	protected function createItem($value) {
130
+		if ($this->_createCols===false)
131 131
 			$value=null;
132
-		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing,$this->_implicitRows);
132
+		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1), $value, $this->_colSizing, $this->_implicitRows);
133 133
 		return $item;
134 134
 	}
135 135
 
136
-	public function setValues($values){
136
+	public function setValues($values) {
137 137
 		$count=$this->count();
138
-		if($this->_createCols===false){
139
-			for($i=$count;$i<\sizeof($values);$i++){
138
+		if ($this->_createCols===false) {
139
+			for ($i=$count; $i<\sizeof($values); $i++) {
140 140
 				$colSize=\sizeof($values[$i]);
141
-				$this->addItem(new HtmlGridRow($this->identifier."-row-".($this->count()+1),$colSize,$this->_colSizing,$this->_implicitRows));
141
+				$this->addItem(new HtmlGridRow($this->identifier."-row-".($this->count()+1), $colSize, $this->_colSizing, $this->_implicitRows));
142 142
 			}
143 143
 		}
144
-		$count=\min(array($this->count(),\sizeof($values)));
145
-		for($i=0;$i<$count;$i++){
146
-			$this->content[$i]->setValues($values[$i],$this->_createCols===false);
144
+		$count=\min(array($this->count(), \sizeof($values)));
145
+		for ($i=0; $i<$count; $i++) {
146
+			$this->content[$i]->setValues($values[$i], $this->_createCols===false);
147 147
 		}
148 148
 	}
149 149
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 class HtmlPopup extends HtmlSemDoubleElement {
11 11
 	private $params;
12 12
 	private $_container;
13
-	public function __construct(BaseHtml $container,$identifier, $content="") {
13
+	public function __construct(BaseHtml $container, $identifier, $content="") {
14 14
 		parent::__construct($identifier, "div");
15 15
 		$this->_container=$container;
16 16
 		$this->setClass("ui popup");
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 		$this->params=array("on"=>"click");
19 19
 	}
20 20
 
21
-	public function setFlowing(){
21
+	public function setFlowing() {
22 22
 		return $this->addToProperty("class", "flowing");
23 23
 	}
24 24
 
25
-	public function setBasic(){
25
+	public function setBasic() {
26 26
 		return $this->addToProperty("class", "basic");
27 27
 	}
28 28
 
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	 * {@inheritDoc}
31 31
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
32 32
 	 */
33
-	public function run(JsUtils $js){
33
+	public function run(JsUtils $js) {
34 34
 		$this->params["popup"]="#".$this->identifier;
35
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->params);
35
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->params);
36 36
 	}
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/HtmlCollection.php 3 patches
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 			foreach ($items as $k=>$v){
18 18
 				$this->addItem([$k,$v]);
19 19
 			}
20
-		}else{
20
+		} else{
21 21
 			foreach ($items as $item){
22 22
 				$this->addItem($item);
23 23
 			}
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55 55
 	public function getItem($index) {
56
-		if (is_int($index))
57
-			return $this->content[$index];
58
-		else {
56
+		if (is_int($index)) {
57
+					return $this->content[$index];
58
+		} else {
59 59
 			$elm=$this->getElementById($index, $this->content);
60 60
 			return $elm;
61 61
 		}
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -87,6 +87,9 @@  discard block
 block discarded – undo
87 87
 		$this->addItem($function($object));
88 88
 	}
89 89
 
90
+	/**
91
+	 * @param \Closure $callBack
92
+	 */
90 93
 	public function apply($callBack){
91 94
 		foreach ($this->content as $item){
92 95
 			$callBack($item);
@@ -121,6 +124,9 @@  discard block
 block discarded – undo
121 124
 		return $this->_bsComponent;
122 125
 	}
123 126
 
127
+	/**
128
+	 * @param string $tagName
129
+	 */
124 130
 	protected function contentAs($tagName){
125 131
 		foreach ($this->content as $item){
126 132
 			$item->setTagName($tagName);
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@  discard block
 block discarded – undo
13 13
  */
14 14
 abstract class HtmlCollection extends HtmlDoubleElement {
15 15
 
16
-	public function __construct($identifier,$tagName="div"){
17
-		parent::__construct($identifier,$tagName);
16
+	public function __construct($identifier, $tagName="div") {
17
+		parent::__construct($identifier, $tagName);
18 18
 		$this->content=array();
19 19
 	}
20 20
 
21
-	public function addItems($items){
22
-		if(JArray::isAssociative($items)){
23
-			foreach ($items as $k=>$v){
24
-				$this->addItem([$k,$v]);
21
+	public function addItems($items) {
22
+		if (JArray::isAssociative($items)) {
23
+			foreach ($items as $k=>$v) {
24
+				$this->addItem([$k, $v]);
25 25
 			}
26
-		}else{
27
-			foreach ($items as $item){
26
+		}else {
27
+			foreach ($items as $item) {
28 28
 				$this->addItem($item);
29 29
 			}
30 30
 		}
31 31
 	}
32 32
 
33
-	public function setItems($items){
33
+	public function setItems($items) {
34 34
 		$this->content=$items;
35 35
 		return $this;
36 36
 	}
37 37
 
38
-	public function getItems(){
38
+	public function getItems() {
39 39
 		return $this->content;
40 40
 	}
41 41
 
42
-	protected function getItemToAdd($item){
42
+	protected function getItemToAdd($item) {
43 43
 		$itemO=$item;
44
-		if($this->createCondition($item)===true){
44
+		if ($this->createCondition($item)===true) {
45 45
 			$itemO=$this->createItem($item);
46 46
 		}
47 47
 		return $itemO;
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
 	 * @param HtmlDoubleElement|string $item
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55
-	public function addItem($item){
55
+	public function addItem($item) {
56 56
 		$itemO=$this->getItemToAdd($item);
57 57
 		$this->addContent($itemO);
58 58
 		return $itemO;
59 59
 	}
60 60
 
61
-	public function insertItem($item,$position=0){
61
+	public function insertItem($item, $position=0) {
62 62
 		$itemO=$this->getItemToAdd($item);
63
-		\array_splice( $this->content, $position, 0, array($itemO));
63
+		\array_splice($this->content, $position, 0, array($itemO));
64 64
 		return $itemO;
65 65
 	}
66 66
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 		return $this;
84 84
 	}
85 85
 
86
-	public function removeItem($index){
86
+	public function removeItem($index) {
87 87
 		return array_splice($this->content, $index, 1);
88 88
 	}
89 89
 
90
-	public function count(){
90
+	public function count() {
91 91
 		return \sizeof($this->content);
92 92
 	}
93 93
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		$this->addItem($function($object));
99 99
 	}
100 100
 
101
-	public function apply($callBack){
102
-		foreach ($this->content as $item){
101
+	public function apply($callBack) {
102
+		foreach ($this->content as $item) {
103 103
 			$callBack($item);
104 104
 		}
105 105
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	protected abstract function createItem($value);
119 119
 
120
-	protected function createCondition($value){
120
+	protected function createCondition($value) {
121 121
 		return \is_object($value)===false;
122 122
 	}
123 123
 
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 		return $this->_bsComponent;
133 133
 	}
134 134
 
135
-	protected function contentAs($tagName){
136
-		foreach ($this->content as $item){
135
+	protected function contentAs($tagName) {
136
+		foreach ($this->content as $item) {
137 137
 			$item->setTagName($tagName);
138 138
 		}
139 139
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlHeader.php 2 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 		if(isset($type)){
16 16
 			if($type=="page"){
17 17
 				$this->asPageHeader($niveau);
18
-			}else
19
-				$this->asContentHeader($niveau);
18
+			} else {
19
+							$this->asContentHeader($niveau);
20
+			}
20 21
 		}
21 22
 		$this->content=$content;
22 23
 	}
@@ -48,7 +49,7 @@  discard block
 block discarded – undo
48 49
 		if(!\is_object($title)){
49 50
 			$this->content=new HtmlDoubleElement("content-".$this->identifier,"div");
50 51
 			$this->content->setContent($title);
51
-		}else{
52
+		} else{
52 53
 			$this->content=$title;
53 54
 		}
54 55
 		$this->content->setClass("content");
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
 
9 9
 class HtmlHeader extends HtmlSemDoubleElement {
10 10
 	protected $image;
11
-	public function __construct($identifier, $niveau=1,$content=NULL,$type="page") {
12
-		parent::__construct($identifier, "div","ui header");
11
+	public function __construct($identifier, $niveau=1, $content=NULL, $type="page") {
12
+		parent::__construct($identifier, "div", "ui header");
13 13
 		$this->_template="<%tagName% %properties%>%image%%content%</%tagName%>";
14
-		if(isset($type)){
15
-			if($type=="page"){
14
+		if (isset($type)) {
15
+			if ($type=="page") {
16 16
 				$this->asPageHeader($niveau);
17 17
 			}else
18 18
 				$this->asContentHeader($niveau);
@@ -20,39 +20,39 @@  discard block
 block discarded – undo
20 20
 		$this->content=$content;
21 21
 	}
22 22
 
23
-	public function asPageHeader($niveau){
23
+	public function asPageHeader($niveau) {
24 24
 		$this->tagName="h".$niveau;
25 25
 	}
26 26
 
27
-	public function asContentHeader($niveau){
27
+	public function asContentHeader($niveau) {
28 28
 		$this->tagName="div";
29
-		if(\is_int($niveau)){
29
+		if (\is_int($niveau)) {
30 30
 			$niveau=Size::getConstantValues()[$niveau];
31 31
 		}
32 32
 		$this->setSize($niveau);
33 33
 	}
34 34
 
35
-	public function asIcon($icon,$title,$subHeader=NULL){
35
+	public function asIcon($icon, $title, $subHeader=NULL) {
36 36
 		$this->addToProperty("class", "icon");
37 37
 		$this->image=new HtmlIcon("icon-".$this->identifier, $icon);
38
-		return $this->asTitle($title,$subHeader);
38
+		return $this->asTitle($title, $subHeader);
39 39
 	}
40 40
 
41
-	public function asImage($src,$title,$subHeader=NULL){
42
-		$this->image=new HtmlImage("img-".$this->identifier, $src,$title);
43
-		return $this->asTitle($title,$subHeader);
41
+	public function asImage($src, $title, $subHeader=NULL) {
42
+		$this->image=new HtmlImage("img-".$this->identifier, $src, $title);
43
+		return $this->asTitle($title, $subHeader);
44 44
 	}
45 45
 
46
-	public function asTitle($title,$subHeader=NULL){
47
-		if(!\is_object($title)){
48
-			$this->content=new HtmlDoubleElement("content-".$this->identifier,"div");
46
+	public function asTitle($title, $subHeader=NULL) {
47
+		if (!\is_object($title)) {
48
+			$this->content=new HtmlDoubleElement("content-".$this->identifier, "div");
49 49
 			$this->content->setContent($title);
50
-		}else{
50
+		}else {
51 51
 			$this->content=$title;
52 52
 		}
53 53
 		$this->content->setClass("content");
54
-		if(isset($subHeader)){
55
-			$sub=new HtmlDoubleElement("subheader-".$this->identifier,"div");
54
+		if (isset($subHeader)) {
55
+			$sub=new HtmlDoubleElement("subheader-".$this->identifier, "div");
56 56
 			$sub->setClass("sub header");
57 57
 			$sub->setContent($subHeader);
58 58
 			$this->content->addContent($sub);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		return $this->image;
65 65
 	}
66 66
 
67
-	public function setDividing(){
67
+	public function setDividing() {
68 68
 		$this->addToProperty("class", "dividing");
69 69
 	}
70 70
 
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/AttachedTrait.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 use Ajax\semantic\html\base\constants\Side;
5 5
 trait AttachedTrait {
6 6
 	/**
7
-	 * @param string $side
8 7
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
9 8
 	 */
10 9
 	public function setAttachment($value=Side::BOTH){
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 	 * @param string $side
8 8
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
9 9
 	 */
10
-	public function setAttachment($value=Side::BOTH){
11
-			return $this->addToPropertyCtrl("class",$value." attached",Side::getConstantValues("attached"));
10
+	public function setAttachment($value=Side::BOTH) {
11
+			return $this->addToPropertyCtrl("class", $value." attached", Side::getConstantValues("attached"));
12 12
 	}
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlDivider.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 	protected $_tabsType="tabs";
21 21
 	protected $stacked="";
22 22
 
23
+	/**
24
+	 * @param string $identifier
25
+	 */
23 26
 	public function __construct($identifier, $tagName="ul") {
24 27
 		parent::__construct($identifier, $tagName);
25 28
 		$this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%";
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class HtmlDivider extends HtmlDoubleElement {
13 13
 
14
-	public function __construct($identifier, $content="",$tagName="div") {
15
-		parent::__construct($identifier, $tagName,"ui divider");
14
+	public function __construct($identifier, $content="", $tagName="div") {
15
+		parent::__construct($identifier, $tagName, "ui divider");
16 16
 		$this->content=$content;
17 17
 	}
18 18
 
@@ -20,23 +20,23 @@  discard block
 block discarded – undo
20 20
 	 * vertical divider
21 21
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
22 22
 	 */
23
-	public function setVertical(){
24
-		return $this->addToPropertyUnique("class", "vertical", array("vertical","horizontal"));
23
+	public function setVertical() {
24
+		return $this->addToPropertyUnique("class", "vertical", array("vertical", "horizontal"));
25 25
 	}
26 26
 
27 27
 	/**
28 28
 	 * horizontal divider
29 29
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
30 30
 	 */
31
-	public function setHorizontal(){
32
-		return $this->addToPropertyUnique("class", "horizontal", array("vertical","horizontal"));
31
+	public function setHorizontal() {
32
+		return $this->addToPropertyUnique("class", "horizontal", array("vertical", "horizontal"));
33 33
 	}
34 34
 
35 35
 	/**
36 36
 	 * hide the divider
37 37
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
38 38
 	 */
39
-	public function setHidden(){
39
+	public function setHidden() {
40 40
 		return $this->addToProperty("class", "hidden");
41 41
 	}
42 42
 
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 	 * fitted, without any space above or below it
45 45
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
46 46
 	 */
47
-	public function setFitted(){
47
+	public function setFitted() {
48 48
 		return $this->addToProperty("class", "fitted");
49 49
 	}
50 50
 
51 51
 	/**
52 52
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
53 53
 	 */
54
-	public function asHeader(){
54
+	public function asHeader() {
55 55
 		return $this->addToProperty("class", "header");
56 56
 	}
57 57
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * inverts the divider colors
60 60
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
61 61
 	 */
62
-	public function setInverted(){
62
+	public function setInverted() {
63 63
 		return $this->addToProperty("class", "inverted");
64 64
 	}
65 65
 }
66 66
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/BaseEnum.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 	public static function getConstants() {
15 15
 		if (self::$constCacheArray==NULL) {
16
-			self::$constCacheArray=[ ];
16
+			self::$constCacheArray=[];
17 17
 		}
18 18
 		$calledClass=get_called_class();
19 19
 		if (!array_key_exists($calledClass, self::$constCacheArray)) {
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 		return self::$constCacheArray [$calledClass];
24 24
 	}
25 25
 
26
-	public static function getConstantValues($postFix=""){
27
-		if($postFix!=="")
26
+	public static function getConstantValues($postFix="") {
27
+		if ($postFix!=="")
28 28
 			return \array_values(self::getConstants());
29
-		else{
30
-			return \array_map(function ($elem) use ($postFix) {return $elem." ".$postFix;},\array_values(self::getConstants()));
29
+		else {
30
+			return \array_map(function($elem) use ($postFix) {return $elem." ".$postFix; },\array_values(self::getConstants()));
31 31
 		}
32 32
 	}
33 33
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public static function getConstantValues($postFix=""){
27
-		if($postFix!=="")
28
-			return \array_values(self::getConstants());
29
-		else{
27
+		if($postFix!=="") {
28
+					return \array_values(self::getConstants());
29
+		} else{
30 30
 			return \array_map(function ($elem) use ($postFix) {return $elem." ".$postFix;},\array_values(self::getConstants()));
31 31
 		}
32 32
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemSingleElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 class HtmlSemSingleElement extends HtmlSingleElement {
15 15
 	use BaseTrait;
16
-	public function __construct($identifier, $tagName="br",$baseClass="ui") {
16
+	public function __construct($identifier, $tagName="br", $baseClass="ui") {
17 17
 		parent::__construct($identifier, $tagName);
18 18
 		$this->_baseClass=$baseClass;
19 19
 		$this->setClass($baseClass);
Please login to merge, or discard this patch.
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.