Completed
Push — master ( b569b1...d88325 )
by Jean-Christophe
03:46
created
Ajax/semantic/html/content/table/HtmlTR.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
 	private $_container;
11 11
 	private $_row;
12 12
 
13
+	/**
14
+	 * @param string $identifier
15
+	 */
13 16
 	public function __construct( $identifier, $colCount){
14 17
 		parent::__construct( $identifier, "tr", "");
15 18
 	}
@@ -35,6 +38,9 @@  discard block
 block discarded – undo
35 38
 		$this->_tdTagName=$tagName;
36 39
 	}
37 40
 
41
+	/**
42
+	 * @param HtmlTableContent $container
43
+	 */
38 44
 	public function setContainer($container,$row){
39 45
 		$this->_container=$container;
40 46
 		$this->_row=$row;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Ajax\semantic\html\base\HtmlSemCollection;
6 6
 
7
-class HtmlTR extends HtmlSemCollection{
7
+class HtmlTR extends HtmlSemCollection {
8 8
 
9 9
 	private $_tdTagName;
10 10
 	private $_container;
11 11
 	private $_row;
12 12
 
13
-	public function __construct( $identifier, $colCount){
14
-		parent::__construct( $identifier, "tr", "");
13
+	public function __construct($identifier, $colCount) {
14
+		parent::__construct($identifier, "tr", "");
15 15
 	}
16 16
 
17
-	public function setColCount($colCount){
17
+	public function setColCount($colCount) {
18 18
 		$count=$this->count();
19
-		for($i=$count;$i<$colCount;$i++){
19
+		for ($i=$count; $i<$colCount; $i++) {
20 20
 			$item=$this->addItem(NULL);
21 21
 			$item->setTagName($this->_tdTagName);
22 22
 		}
@@ -24,36 +24,36 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 
27
-	protected function createItem($value){
27
+	protected function createItem($value) {
28 28
 		$count=$this->count();
29
-		$td=new HtmlTD("",$this->_container,$value,$this->_tdTagName);
29
+		$td=new HtmlTD("", $this->_container, $value, $this->_tdTagName);
30 30
 		$td->setContainer($this->_container, $this->_row, $count);
31 31
 		return $td;
32 32
 	}
33 33
 
34
-	public function setTdTagName($tagName="td"){
34
+	public function setTdTagName($tagName="td") {
35 35
 		$this->_tdTagName=$tagName;
36 36
 	}
37 37
 
38
-	public function setContainer($container,$row){
38
+	public function setContainer($container, $row) {
39 39
 		$this->_container=$container;
40 40
 		$this->_row=$row;
41 41
 	}
42 42
 
43
-	public function setValues($values=array()){
43
+	public function setValues($values=array()) {
44 44
 		$count=$this->count();
45
-		if(\is_array($values)===false){
45
+		if (\is_array($values)===false) {
46 46
 			$values=\array_fill(0, $count, $values);
47 47
 		}
48
-		$count=\min(\sizeof($values),$count);
48
+		$count=\min(\sizeof($values), $count);
49 49
 
50
-		for ($i=0;$i<$count;$i++){
50
+		for ($i=0; $i<$count; $i++) {
51 51
 			$cell=$this->content[$i];
52 52
 			$cell->setValue($values[$i]);
53 53
 		}
54 54
 	}
55 55
 
56
-	public function delete($index){
56
+	public function delete($index) {
57 57
 		$this->removeItem($index);
58 58
 		return $this;
59 59
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlTable.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,35 +17,35 @@  discard block
 block discarded – undo
17 17
 	 * @param string $key
18 18
 	 * @return HtmlTableContent
19 19
 	 */
20
-	private function getPart($key){
21
-		if(\array_key_exists($key, $this->content)===false){
22
-			$this->content[$key]=new HtmlTableContent("",$key);
23
-			if($key!=="tbody"){
20
+	private function getPart($key) {
21
+		if (\array_key_exists($key, $this->content)===false) {
22
+			$this->content[$key]=new HtmlTableContent("", $key);
23
+			if ($key!=="tbody") {
24 24
 				$this->content[$key]->setRowCount(1, $this->_colCount);
25 25
 			}
26 26
 		}
27 27
 		return $this->content[$key];
28 28
 	}
29 29
 
30
-	public function getBody(){
30
+	public function getBody() {
31 31
 		return $this->getPart("tbody");
32 32
 	}
33 33
 
34
-	public function getHeader(){
34
+	public function getHeader() {
35 35
 		return $this->getPart("thead");
36 36
 	}
37 37
 
38
-	public function getFooter(){
38
+	public function getFooter() {
39 39
 		return $this->getPart("tfoot");
40 40
 	}
41 41
 
42
-	public function hasPart($key){
42
+	public function hasPart($key) {
43 43
 		return \array_key_exists($key, $this->content)===true;
44 44
 	}
45 45
 
46 46
 	public function setRowCount($rowCount, $colCount) {
47 47
 		$this->_colCount=$colCount;
48
-		return $this->getBody()->setRowCount($rowCount,$colCount);
48
+		return $this->getBody()->setRowCount($rowCount, $colCount);
49 49
 	}
50 50
 
51 51
 	/**
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 	 * @param int $col
55 55
 	 * @return \Ajax\semantic\html\content\HtmlTD
56 56
 	 */
57
-	public function getCell($row,$col){
58
-		return $this->getBody()->getCell($row,$col);
57
+	public function getCell($row, $col) {
58
+		return $this->getBody()->getCell($row, $col);
59 59
 	}
60 60
 
61
-	public function setValues($values=array()){
61
+	public function setValues($values=array()) {
62 62
 		$this->getBody()->setValues($values);
63 63
 	}
64 64
 }
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlPaginationMenu.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@
 block discarded – undo
7 7
 use Phalcon\Mvc\View;
8 8
 use Ajax\semantic\html\elements\HtmlIcon;
9 9
 
10
-class HtmlPaginationMenu extends HtmlMenu{
10
+class HtmlPaginationMenu extends HtmlMenu {
11 11
 
12
-	public function __construct( $identifier, $items=array() ){
13
-		parent::__construct( $identifier,$items);
12
+	public function __construct($identifier, $items=array()) {
13
+		parent::__construct($identifier, $items);
14 14
 	}
15 15
 	/**
16 16
 	 * {@inheritDoc}
17 17
 	 * @see \Ajax\common\html\BaseHtml::compile()
18 18
 	 */
19
-	public function compile(JsUtils $js=NULL,View $view=NULL){
19
+	public function compile(JsUtils $js=NULL, View $view=NULL) {
20 20
 		$this->insertItem(new HtmlIcon("", "left chevron"));
21 21
 		$this->addItem(new HtmlIcon("", "right chevron"));
22 22
 		$this->asPagination();
23
-		return parent::compile($js,$view);
23
+		return parent::compile($js, $view);
24 24
 	}
25 25
 }
26 26
\ No newline at end of file
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
@@ -8,42 +8,42 @@
 block discarded – undo
8 8
 	private $_container;
9 9
 	private $_row;
10 10
 	private $_col;
11
-	public function __construct($identifier,$content=NULL,$tagName="td") {
11
+	public function __construct($identifier, $content=NULL, $tagName="td") {
12 12
 		parent::__construct($identifier, $tagName, "", $content);
13 13
 	}
14 14
 
15
-	public function setContainer($container,$row,$col){
15
+	public function setContainer($container, $row, $col) {
16 16
 		$this->_container=$container;
17 17
 		$this->_row=$row;
18 18
 		$this->_col=$col;
19 19
 	}
20 20
 
21
-	public function setValue($value){
21
+	public function setValue($value) {
22 22
 		$this->content=$value;
23 23
 		return $this;
24 24
 	}
25 25
 
26
-	public function setRowspan($rowspan){
27
-		$to=min($this->_container->count(),$this->_row+$rowspan-1);
28
-		for($i=$to;$i>$this->_row;$i--){
29
-			$this->_container->delete($this->_row+1,$this->_col);
26
+	public function setRowspan($rowspan) {
27
+		$to=min($this->_container->count(), $this->_row+$rowspan-1);
28
+		for ($i=$to; $i>$this->_row; $i--) {
29
+			$this->_container->delete($this->_row+1, $this->_col);
30 30
 		}
31 31
 		$this->setProperty("rowspan", $rowspan);
32 32
 		return $this->_container;
33 33
 	}
34 34
 
35
-	public function rowMerge(){
35
+	public function rowMerge() {
36 36
 		return $this->setRowspan($this->_container->count());
37 37
 	}
38 38
 
39
-	public function colMerge(){
39
+	public function colMerge() {
40 40
 		return $this->setColspan($this->_container->getRow($this->_row)->count());
41 41
 	}
42 42
 
43
-	public function setColspan($colspan){
44
-		$to=min($this->_container->getRow($this->_row)->count(),$this->_col+$colspan-1);
45
-		for($i=$to;$i>$this->_col;$i--){
46
-			$this->_container->delete($this->_row,$this->_col+1);
43
+	public function setColspan($colspan) {
44
+		$to=min($this->_container->getRow($this->_row)->count(), $this->_col+$colspan-1);
45
+		for ($i=$to; $i>$this->_col; $i--) {
46
+			$this->_container->delete($this->_row, $this->_col+1);
47 47
 		}
48 48
 		$this->setProperty("colspan", $colspan);
49 49
 		return $this->_container;
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlCollectionsTrait.php 1 patch
Spacing   +3 added lines, -3 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 htmlTable($identifier, $rowCount, $colCount){
29
+	public function htmlTable($identifier, $rowCount, $colCount) {
30 30
 		return $this->addHtmlComponent(new HtmlTable($identifier, $rowCount, $colCount));
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.