Completed
Push — master ( 916f6f...ea2a7d )
by Jean-Christophe
03:42
created
Ajax/semantic/html/content/table/HtmlTableContent.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
 	/**
72 72
 	 * @param int $index
73
-	 * @return \Ajax\semantic\html\content\HtmlTR
73
+	 * @return \Ajax\common\html\HtmlDoubleElement
74 74
 	 */
75 75
 	public function getRow($index){
76 76
 		return $this->getItem($index);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  *
12 12
  */
13 13
 class HtmlTableContent extends HtmlSemCollection {
14
-	protected $_tdTagNames=[ "thead" => "th","tbody" => "td","tfoot" => "th" ];
14
+	protected $_tdTagNames=["thead" => "th", "tbody" => "td", "tfoot" => "th"];
15 15
 
16 16
 	/**
17 17
 	 *
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) {
24 24
 		parent::__construct($identifier, $tagName, "");
25
-		if (isset($rowCount)&&isset($colCount))
25
+		if (isset($rowCount) && isset($colCount))
26 26
 			$this->setRowCount($rowCount, $colCount);
27 27
 	}
28 28
 
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	public function setRowCount($rowCount, $colCount) {
36 36
 		$count=$this->count();
37
-		for($i=$count; $i<$rowCount; $i++) {
37
+		for ($i=$count; $i<$rowCount; $i++) {
38 38
 			$this->addItem($colCount);
39 39
 		}
40
-		for($i=0; $i<$rowCount; $i++) {
40
+		for ($i=0; $i<$rowCount; $i++) {
41 41
 			$item=$this->content[$i];
42 42
 			$item->setTdTagName($this->_tdTagNames[$this->tagName]);
43 43
 			$this->content[$i]->setColCount($colCount);
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
 			$values=\array_fill(0, $count, $values);
108 108
 			$isArray=false;
109 109
 		}
110
-		if (JArray::dimension($values)==1&&$isArray)
111
-			$values=[ $values ];
110
+		if (JArray::dimension($values)==1 && $isArray)
111
+			$values=[$values];
112 112
 		
113 113
 		$count=\min(\sizeof($values), $count);
114 114
 		
115
-		for($i=0; $i<$count; $i++) {
115
+		for ($i=0; $i<$count; $i++) {
116 116
 			$row=$this->content[$i];
117 117
 			$row->setValues($values[$i]);
118 118
 		}
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			$values=\array_fill(0, $count, $values);
126 126
 		}
127 127
 		$count=\min(\sizeof($values), $count);
128
-		for($i=0; $i<$count; $i++) {
128
+		for ($i=0; $i<$count; $i++) {
129 129
 			$this->getCell($i, $colIndex)->setValue($values[$i]);
130 130
 		}
131 131
 		return $this;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 	public function colCenter($colIndex) {
144 144
 		$count=$this->count();
145
-		for($i=0; $i<$count; $i++) {
145
+		for ($i=0; $i<$count; $i++) {
146 146
 			$this->getCell($i, $colIndex)->textCenterAligned();
147 147
 		}
148 148
 		return $this;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
 	public function colRight($colIndex) {
152 152
 		$count=$this->count();
153
-		for($i=0; $i<$count; $i++) {
153
+		for ($i=0; $i<$count; $i++) {
154 154
 			$this->getCell($i, $colIndex)->textRightAligned();
155 155
 		}
156 156
 		return $this;
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 			if (isset($row)===true) {
188 188
 				$row->delete($colIndex);
189 189
 			}
190
-		} else {
190
+		}else {
191 191
 			$this->removeItem($rowIndex);
192 192
 		}
193 193
 		return $this;
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) {
24 24
 		parent::__construct($identifier, $tagName, "");
25
-		if (isset($rowCount)&&isset($colCount))
26
-			$this->setRowCount($rowCount, $colCount);
25
+		if (isset($rowCount)&&isset($colCount)) {
26
+					$this->setRowCount($rowCount, $colCount);
27
+		}
27 28
 	}
28 29
 
29 30
 	/**
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
 			$values=\array_fill(0, $count, $values);
108 109
 			$isArray=false;
109 110
 		}
110
-		if (JArray::dimension($values)==1&&$isArray)
111
-			$values=[ $values ];
111
+		if (JArray::dimension($values)==1&&$isArray) {
112
+					$values=[ $values ];
113
+		}
112 114
 		
113 115
 		$count=\min(\sizeof($values), $count);
114 116
 		
@@ -170,8 +172,9 @@  discard block
 block discarded – undo
170 172
 	 */
171 173
 	public function getColCount() {
172 174
 		$result=0;
173
-		if ($this->count()>0)
174
-			$result=$this->getItem(0)->getColCount();
175
+		if ($this->count()>0) {
176
+					$result=$this->getItem(0)->getColCount();
177
+		}
175 178
 		return $result;
176 179
 	}
177 180
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTR.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   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
  * @author jc
9 9
  *
10 10
  */
11
-class HtmlTR extends HtmlSemCollection{
11
+class HtmlTR extends HtmlSemCollection {
12 12
 
13 13
 	private $_tdTagName;
14 14
 	private $_container;
15 15
 	private $_row;
16 16
 
17
-	public function __construct( $identifier, $colCount){
18
-		parent::__construct( $identifier, "tr", "");
17
+	public function __construct($identifier, $colCount) {
18
+		parent::__construct($identifier, "tr", "");
19 19
 	}
20 20
 
21
-	public function setColCount($colCount){
21
+	public function setColCount($colCount) {
22 22
 		$count=$this->count();
23
-		for($i=$count;$i<$colCount;$i++){
23
+		for ($i=$count; $i<$colCount; $i++) {
24 24
 			$item=$this->addItem(NULL);
25 25
 			$item->setTagName($this->_tdTagName);
26 26
 		}
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 	 * {@inheritDoc}
33 33
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
34 34
 	 */
35
-	protected function createItem($value){
35
+	protected function createItem($value) {
36 36
 		$count=$this->count();
37
-		$td=new HtmlTD("",$value,$this->_tdTagName);
37
+		$td=new HtmlTD("", $value, $this->_tdTagName);
38 38
 		$td->setContainer($this->_container, $this->_row, $count);
39 39
 		return $td;
40 40
 	}
41 41
 
42
-	public function setTdTagName($tagName="td"){
42
+	public function setTdTagName($tagName="td") {
43 43
 		$this->_tdTagName=$tagName;
44 44
 	}
45 45
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param HtmlTableContent $container
49 49
 	 * @param int $row
50 50
 	 */
51
-	public function setContainer($container,$row){
51
+	public function setContainer($container, $row) {
52 52
 		$this->_container=$container;
53 53
 		$this->_row=$row;
54 54
 	}
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 	 * Sets values to the row cols
58 58
 	 * @param mixed $values
59 59
 	 */
60
-	public function setValues($values=array()){
60
+	public function setValues($values=array()) {
61 61
 		$count=$this->count();
62
-		if(\is_array($values)===false){
62
+		if (\is_array($values)===false) {
63 63
 			$values=\array_fill(0, $count, $values);
64 64
 		}
65
-		$count=\min(\sizeof($values),$count);
65
+		$count=\min(\sizeof($values), $count);
66 66
 
67
-		for ($i=0;$i<$count;$i++){
67
+		for ($i=0; $i<$count; $i++) {
68 68
 			$cell=$this->content[$i];
69 69
 			$cell->setValue($values[$i]);
70 70
 		}
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
 	 * @param int $index the index of the col to remove
76 76
 	 * @return \Ajax\semantic\html\content\table\HtmlTR
77 77
 	 */
78
-	public function delete($index){
78
+	public function delete($index) {
79 79
 		$this->removeItem($index);
80 80
 		return $this;
81 81
 	}
82 82
 
83
-	public function mergeCol($colIndex=0){
83
+	public function mergeCol($colIndex=0) {
84 84
 		return $this->getItem($colIndex)->mergeCol();
85 85
 	}
86 86
 
87
-	public function mergeRow($colIndex=0){
87
+	public function mergeRow($colIndex=0) {
88 88
 		return $this->getItem($colIndex)->mergeRow();
89 89
 	}
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlLinkTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -4,6 +4,9 @@
 block discarded – undo
4 4
 
5 5
 trait HtmlLinkTrait {
6 6
 
7
+	/**
8
+	 * @param string $value
9
+	 */
7 10
 	public function setHref($value) {
8 11
 		$this->setProperty("href", $value);
9 12
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTD.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,42 +15,42 @@
 block discarded – undo
15 15
 	 * @param mixed $content
16 16
 	 * @param string $tagName
17 17
 	 */
18
-	public function __construct($identifier,$content=NULL,$tagName="td") {
18
+	public function __construct($identifier, $content=NULL, $tagName="td") {
19 19
 		parent::__construct($identifier, $tagName, "", $content);
20 20
 	}
21 21
 
22
-	public function setContainer($container,$row,$col){
22
+	public function setContainer($container, $row, $col) {
23 23
 		$this->_container=$container;
24 24
 		$this->_row=$row;
25 25
 		$this->_col=$col;
26 26
 	}
27 27
 
28
-	public function setValue($value){
28
+	public function setValue($value) {
29 29
 		$this->content=$value;
30 30
 		return $this;
31 31
 	}
32 32
 
33
-	public function setRowspan($rowspan){
34
-		$to=min($this->_container->count(),$this->_row+$rowspan-1);
35
-		for($i=$to;$i>$this->_row;$i--){
36
-			$this->_container->delete($this->_row+1,$this->_col);
33
+	public function setRowspan($rowspan) {
34
+		$to=min($this->_container->count(), $this->_row+$rowspan-1);
35
+		for ($i=$to; $i>$this->_row; $i--) {
36
+			$this->_container->delete($this->_row+1, $this->_col);
37 37
 		}
38 38
 		$this->setProperty("rowspan", $rowspan);
39 39
 		return $this->_container;
40 40
 	}
41 41
 
42
-	public function mergeRow(){
42
+	public function mergeRow() {
43 43
 		return $this->setRowspan($this->_container->count());
44 44
 	}
45 45
 
46
-	public function mergeCol(){
46
+	public function mergeCol() {
47 47
 		return $this->setColspan($this->_container->getRow($this->_row)->count());
48 48
 	}
49 49
 
50
-	public function setColspan($colspan){
51
-		$to=min($this->_container->getRow($this->_row)->count(),$this->_col+$colspan-1);
52
-		for($i=$to;$i>$this->_col;$i--){
53
-			$this->_container->delete($this->_row,$this->_col+1);
50
+	public function setColspan($colspan) {
51
+		$to=min($this->_container->getRow($this->_row)->count(), $this->_col+$colspan-1);
52
+		for ($i=$to; $i>$this->_col; $i--) {
53
+			$this->_container->delete($this->_row, $this->_col+1);
54 54
 		}
55 55
 		$this->setProperty("colspan", $colspan);
56 56
 		return $this->_container;
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",CELLED="celled",COMPACT="compact",FLUID="fluid",INVERTED="inverted",PADDED="padded",TRANSPARENT="transparent";
8
+	const ANIMATED="animated", AVATAR="avatar", CELLED="celled", 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/base/traits/TextAlignmentTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,23 +10,23 @@
 block discarded – undo
10 10
 	 * @param string $value
11 11
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
12 12
 	 */
13
-	public function setTextAlignment($value=TextAlignment::LEFT){
14
-		return $this->addToPropertyCtrl("class", $value,TextAlignment::getConstants());
13
+	public function setTextAlignment($value=TextAlignment::LEFT) {
14
+		return $this->addToPropertyCtrl("class", $value, TextAlignment::getConstants());
15 15
 	}
16 16
 
17
-	public function textCenterAligned(){
17
+	public function textCenterAligned() {
18 18
 		return $this->setTextAlignment(TextAlignment::CENTER);
19 19
 	}
20 20
 
21
-	public function textJustified(){
21
+	public function textJustified() {
22 22
 		return $this->setTextAlignment(TextAlignment::JUSTIFIED);
23 23
 	}
24 24
 
25
-	public function textRightAligned(){
25
+	public function textRightAligned() {
26 26
 		return $this->setTextAlignment(TextAlignment::RIGHT);
27 27
 	}
28 28
 
29
-	public function textLeftAligned(){
29
+	public function textLeftAligned() {
30 30
 		return $this->setTextAlignment();
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlModulesTrait.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,6 @@
 block discarded – undo
23 23
 
24 24
 	/**
25 25
 	 * @param string $identifier
26
-	 * @param int $rowCount
27
-	 * @param int $colCount
28 26
 	 */
29 27
 	public function htmlRating($identifier, $value, $max,$icon=""){
30 28
 		return $this->addHtmlComponent(new HtmlRating($identifier, $value, $max,$icon));
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 	 * @param mixed $value
18 18
 	 * @param CheckboxType $type
19 19
 	 */
20
-	public function htmlCheckbox($identifier, $label=NULL,$value=NULL,$type=NULL){
21
-		return $this->addHtmlComponent(new HtmlFormCheckbox($identifier,$label,$value,$type));
20
+	public function htmlCheckbox($identifier, $label=NULL, $value=NULL, $type=NULL) {
21
+		return $this->addHtmlComponent(new HtmlFormCheckbox($identifier, $label, $value, $type));
22 22
 	}
23 23
 
24 24
 	/**
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @param int $rowCount
27 27
 	 * @param int $colCount
28 28
 	 */
29
-	public function htmlRating($identifier, $value, $max,$icon=""){
30
-		return $this->addHtmlComponent(new HtmlRating($identifier, $value, $max,$icon));
29
+	public function htmlRating($identifier, $value, $max, $icon="") {
30
+		return $this->addHtmlComponent(new HtmlRating($identifier, $value, $max, $icon));
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
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.
Ajax/semantic/html/collections/HtmlTable.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public function __construct($identifier, $rowCount, $colCount) {
18 18
 		parent::__construct($identifier, "table", "ui table");
19
-		$this->content=array ();
19
+		$this->content=array();
20 20
 		$this->setRowCount($rowCount, $colCount);
21
-		$this->_variations=[ Variation::CELLED,Variation::PADDED ];
21
+		$this->_variations=[Variation::CELLED, Variation::PADDED];
22 22
 	}
23 23
 
24 24
 	/**
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 
126 126
 	public function setBasic($very=false) {
127 127
 		if ($very)
128
-			$this->addToPropertyCtrl("class", "very", array ("very" ));
129
-		return $this->addToPropertyCtrl("class", "basic", array ("basic" ));
128
+			$this->addToPropertyCtrl("class", "very", array("very"));
129
+		return $this->addToPropertyCtrl("class", "basic", array("basic"));
130 130
 	}
131 131
 
132 132
 	public function setCollapsing() {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,15 +106,17 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	public function colCenter($colIndex) {
109
-		if ($this->hasPart("thead"))
110
-			$this->getHeader()->colCenter($colIndex);
109
+		if ($this->hasPart("thead")) {
110
+					$this->getHeader()->colCenter($colIndex);
111
+		}
111 112
 		$this->getBody()->colCenter($colIndex);
112 113
 		return $this;
113 114
 	}
114 115
 
115 116
 	public function colRight($colIndex) {
116
-		if ($this->hasPart("thead"))
117
-			$this->getHeader()->colRight($colIndex);
117
+		if ($this->hasPart("thead")) {
118
+					$this->getHeader()->colRight($colIndex);
119
+		}
118 120
 		$this->getBody()->colRight($colIndex);
119 121
 		return $this;
120 122
 	}
@@ -124,8 +126,9 @@  discard block
 block discarded – undo
124 126
 	}
125 127
 
126 128
 	public function setBasic($very=false) {
127
-		if ($very)
128
-			$this->addToPropertyCtrl("class", "very", array ("very" ));
129
+		if ($very) {
130
+					$this->addToPropertyCtrl("class", "very", array ("very" ));
131
+		}
129 132
 		return $this->addToPropertyCtrl("class", "basic", array ("basic" ));
130 133
 	}
131 134
 
Please login to merge, or discard this patch.