Completed
Push — master ( 4f3dcc...7c25a4 )
by Jean-Christophe
07:30 queued 02:49
created
Ajax/bootstrap/components/Modal.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -54,6 +54,9 @@
 block discarded – undo
54 54
 		return $this->setParam("keyboard", $value);
55 55
 	}
56 56
 
57
+	/**
58
+	 * @param boolean $value
59
+	 */
57 60
 	public function setDraggable($value) {
58 61
 		if ($value) {
59 62
 			$this->jsCodes ["draggable"]=new Draggable();
Please login to merge, or discard this patch.
Ajax/bootstrap/html/base/HtmlNavElement.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,10 @@  discard block
 block discarded – undo
19 19
 	protected $attr;
20 20
 
21 21
 
22
+	/**
23
+	 * @param string $identifier
24
+	 * @param string $tagName
25
+	 */
22 26
 	public function __construct($identifier,$tagName){
23 27
 		parent::__construct($identifier,$tagName);
24 28
 		$this->root="";
@@ -29,7 +33,6 @@  discard block
 block discarded – undo
29 33
 	 * Associate an ajax get to the elements, displayed in $targetSelector
30 34
 	 * $attr member is used to build each element url
31 35
 	 * @param string $targetSelector the target of the get
32
-	 * @param string $attr the html attribute used to build the elements url
33 36
 	 * @return HtmlNavElement
34 37
 	 */
35 38
 	public function autoGetOnClick($targetSelector){
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 	protected $attr;
20 20
 
21 21
 
22
-	public function __construct($identifier,$tagName){
23
-		parent::__construct($identifier,$tagName);
22
+	public function __construct($identifier, $tagName) {
23
+		parent::__construct($identifier, $tagName);
24 24
 		$this->root="";
25 25
 		$this->attr="data-ajax";
26 26
 	}
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 	 * @param string $attr the html attribute used to build the elements url
33 33
 	 * @return HtmlNavElement
34 34
 	 */
35
-	public function autoGetOnClick($targetSelector){
36
-		return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr));
35
+	public function autoGetOnClick($targetSelector) {
36
+		return $this->getOnClick($this->root, $targetSelector, array("attr"=>$this->attr));
37 37
 	}
38 38
 
39
-	public function contentAsString(){
39
+	public function contentAsString() {
40 40
 		return implode("", $this->content);
41 41
 	}
42 42
 
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
 	 * Generate the jquery script to set the elements to the HtmlNavElement
45 45
 	 * @param JsUtils $jsUtils
46 46
 	 */
47
-	public function jsSetContent(JsUtils $jsUtils){
48
-		$jsUtils->html("#".$this->identifier,str_replace("\"","'", $this->contentAsString()),true);
47
+	public function jsSetContent(JsUtils $jsUtils) {
48
+		$jsUtils->html("#".$this->identifier, str_replace("\"", "'", $this->contentAsString()), true);
49 49
 	}
50 50
 
51 51
 	public function getRoot() {
52 52
 		return $this->root;
53 53
 	}
54 54
 	public function setRoot($root) {
55
-		$this->root = $root;
55
+		$this->root=$root;
56 56
 		return $this;
57 57
 	}
58 58
 	public function getAttr() {
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 	 * @return HtmlNavElement
66 66
 	 */
67 67
 	public function setAttr($attr) {
68
-		$this->attr = $attr;
68
+		$this->attr=$attr;
69 69
 		return $this;
70 70
 	}
71 71
 
72 72
 	public function __call($method, $args) {
73
-		if(isset($this->$method) && is_callable($this->$method)) {
73
+		if (isset($this->$method) && is_callable($this->$method)) {
74 74
 			return call_user_func_array(
75 75
 					$this->$method,
76 76
 					$args
@@ -78,6 +78,6 @@  discard block
 block discarded – undo
78 78
 		}
79 79
 	}
80 80
 
81
-	public abstract function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0);
81
+	public abstract function fromDispatcher(JsUtils $js, $dispatcher, $startIndex=0);
82 82
 
83 83
 }
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlGridRow.php 4 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -14,6 +14,11 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class HtmlGridRow extends HtmlBsDoubleElement {
16 16
 	private $cols;
17
+
18
+	/**
19
+	 * @param string $identifier
20
+	 * @param integer $numCols
21
+	 */
17 22
 	public function __construct($identifier,$numCols=NULL){
18 23
 		parent::__construct($identifier,"div");
19 24
 		$this->setProperty("class", "row");
@@ -86,6 +91,11 @@  discard block
 block discarded – undo
86 91
 			$this->delete($size,$start+1, $width);
87 92
 		}
88 93
 	}
94
+
95
+	/**
96
+	 * @param integer $start
97
+	 * @param integer $width
98
+	 */
89 99
 	public function delete($size=CssSize::SIZE_MD,$start,$width){
90 100
 		while($start<sizeof($this->cols)+1 && $width>0){
91 101
 			$col=$this->getColAt($start,false);
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -14,89 +14,89 @@
 block discarded – undo
14 14
  */
15 15
 class HtmlGridRow extends HtmlBsDoubleElement {
16 16
 	private $cols;
17
-	public function __construct($identifier,$numCols=NULL){
18
-		parent::__construct($identifier,"div");
17
+	public function __construct($identifier, $numCols=NULL) {
18
+		parent::__construct($identifier, "div");
19 19
 		$this->setProperty("class", "row");
20 20
 		$this->cols=array();
21
-		if(isset($numCols)){
22
-			$numCols=min(12,$numCols);
23
-			$numCols=max(1,$numCols);
21
+		if (isset($numCols)) {
22
+			$numCols=min(12, $numCols);
23
+			$numCols=max(1, $numCols);
24 24
 			$width=12/$numCols;
25
-			for ($i=0;$i<$numCols;$i++){
26
-				$this->addCol(CssSize::SIZE_MD,$width);
25
+			for ($i=0; $i<$numCols; $i++) {
26
+				$this->addCol(CssSize::SIZE_MD, $width);
27 27
 			}
28 28
 		}
29 29
 	}
30 30
 
31
-	public function addCol($size=CssSize::SIZE_MD,$width=1){
32
-		$col=new HtmlGridCol($this->identifier."-col-".(sizeof($this->cols)+1),$size,$width);
31
+	public function addCol($size=CssSize::SIZE_MD, $width=1) {
32
+		$col=new HtmlGridCol($this->identifier."-col-".(sizeof($this->cols)+1), $size, $width);
33 33
 		$this->cols[]=$col;
34 34
 		return $col;
35 35
 	}
36 36
 
37
-	public function addColAt($size=CssSize::SIZE_MD,$width=1,$offset=1){
38
-		$col=$this->addCol($size,$width);
39
-		return $col->setOffset($size, max($offset,sizeof($this->cols)+1));
37
+	public function addColAt($size=CssSize::SIZE_MD, $width=1, $offset=1) {
38
+		$col=$this->addCol($size, $width);
39
+		return $col->setOffset($size, max($offset, sizeof($this->cols)+1));
40 40
 	}
41 41
 
42
-	public function getCol($index,$force=true){
42
+	public function getCol($index, $force=true) {
43 43
 		$result=null;
44
-		if($index<sizeof($this->cols)+1){
44
+		if ($index<sizeof($this->cols)+1) {
45 45
 			$result=$this->cols[$index-1];
46
-		}else if ($force){
47
-			$result=$this->addColAt(CssSize::SIZE_MD,1,$index);
46
+		} else if ($force) {
47
+			$result=$this->addColAt(CssSize::SIZE_MD, 1, $index);
48 48
 		}
49 49
 		return $result;
50 50
 	}
51 51
 
52
-	public function getColAt($offset,$force=true){
52
+	public function getColAt($offset, $force=true) {
53 53
 		$result=null;
54
-		foreach ($this->cols as $col){
54
+		foreach ($this->cols as $col) {
55 55
 			$offsets=$col->getOffsets();
56
-			if($result=array_search($offset, $offsets)){
56
+			if ($result=array_search($offset, $offsets)) {
57 57
 				break;
58 58
 			}
59 59
 		}
60
-		if(!$result || isset($result)==false){
61
-			$result=$this->getCol($offset,$force);
60
+		if (!$result || isset($result)==false) {
61
+			$result=$this->getCol($offset, $force);
62 62
 		}
63 63
 		return $result;
64 64
 	}
65 65
 
66 66
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
67 67
 
68
-		foreach ($this->cols as $col){
68
+		foreach ($this->cols as $col) {
69 69
 			$this->addContent($col);
70 70
 		}
71
-		return parent::compile($js,$view);
71
+		return parent::compile($js, $view);
72 72
 	}
73 73
 	public function getCols() {
74 74
 		return $this->cols;
75 75
 	}
76 76
 
77
-	public function setContentForAll($content){
78
-		foreach ($this->cols as $col){
77
+	public function setContentForAll($content) {
78
+		foreach ($this->cols as $col) {
79 79
 			$col->setContent($content);
80 80
 		}
81 81
 	}
82
-	public function merge($size=CssSize::SIZE_MD,$start,$width){
83
-		$col=$this->getColAt($start,false);
84
-		if(isset($col)){
85
-			$col->setWidth($size,$width+1);
86
-			$this->delete($size,$start+1, $width);
82
+	public function merge($size=CssSize::SIZE_MD, $start, $width) {
83
+		$col=$this->getColAt($start, false);
84
+		if (isset($col)) {
85
+			$col->setWidth($size, $width+1);
86
+			$this->delete($size, $start+1, $width);
87 87
 		}
88 88
 	}
89
-	public function delete($size=CssSize::SIZE_MD,$start,$width){
90
-		while($start<sizeof($this->cols)+1 && $width>0){
91
-			$col=$this->getColAt($start,false);
92
-			if(isset($col)){
89
+	public function delete($size=CssSize::SIZE_MD, $start, $width) {
90
+		while ($start<sizeof($this->cols)+1 && $width>0) {
91
+			$col=$this->getColAt($start, false);
92
+			if (isset($col)) {
93 93
 				$widthCol=$col->getWidth($size);
94
-				if($widthCol<=$width){
94
+				if ($widthCol<=$width) {
95 95
 					unset($this->cols[$start-1]);
96
-					$this->cols = array_values($this->cols);
96
+					$this->cols=array_values($this->cols);
97 97
 					$width=$width-$widthCol;
98 98
 				}
99
-			}else{
99
+			} else {
100 100
 				$width=0;
101 101
 			}
102 102
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$result=null;
44 44
 		if($index<sizeof($this->cols)+1){
45 45
 			$result=$this->cols[$index-1];
46
-		}else if ($force){
46
+		} else if ($force){
47 47
 			$result=$this->addColAt(CssSize::SIZE_MD,1,$index);
48 48
 		}
49 49
 		return $result;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 					$this->cols = array_values($this->cols);
97 97
 					$width=$width-$widthCol;
98 98
 				}
99
-			}else{
99
+			} else{
100 100
 				$width=0;
101 101
 			}
102 102
 		}
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
6 6
 use Ajax\JsUtils;
7 7
 use Ajax\service\JArray;
8
-
9 8
 use Ajax\semantic\html\base\constants\State;
10 9
 
11 10
 class HtmlProgress extends HtmlSemDoubleElement {
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtongroups.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -49,6 +49,9 @@
 block discarded – undo
49 49
 			$element->setStyle($value);
50 50
 	}
51 51
 
52
+	/**
53
+	 * @param HtmlDropdown $bt
54
+	 */
52 55
 	private function dropdownAsButton($bt) {
53 56
 		$this->addExistingDropDown($bt);
54 57
 		$bt->setTagName("button");
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @return HtmlButtongroups default : ""
36 36
 	 */
37 37
 	public function setSize($size) {
38
-		foreach ( $this->elements as $element ) {
38
+		foreach ($this->elements as $element) {
39 39
 			$element->setSize($size);
40 40
 		}
41 41
 		if (is_int($size)) {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	public function setStyle($value) {
48
-		foreach ( $this->elements as $element )
48
+		foreach ($this->elements as $element)
49 49
 			$element->setStyle($value);
50 50
 	}
51 51
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	public function addElement($element) {
66 66
 		$result=$element;
67 67
 		$iid=sizeof($this->elements)+1;
68
-		if (($element instanceof HtmlDropdown)||($element instanceof HtmlSplitbutton)) {
68
+		if (($element instanceof HtmlDropdown) || ($element instanceof HtmlSplitbutton)) {
69 69
 			$this->addExistingDropDown($element);
70 70
 			$this->elements[]=$element;
71 71
 		} elseif ($element instanceof HtmlButton) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	}
95 95
 
96 96
 	public function addElements($elements) {
97
-		foreach ( $elements as $element ) {
97
+		foreach ($elements as $element) {
98 98
 			$this->addElement($element);
99 99
 		}
100 100
 		return $this;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		} else
115 115
 			$value="btn-group-".$value;
116 116
 		if (strstr($value, "justified")) {
117
-			foreach ( $this->elements as $element ) {
117
+			foreach ($this->elements as $element) {
118 118
 				$element->wrap('<div class="btn-group" role="group">', '</div>');
119 119
 			}
120 120
 		}
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
146 146
 	 */
147 147
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
148
-		foreach ( $this->elements as $element ) {
148
+		foreach ($this->elements as $element) {
149 149
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
150 150
 		}
151 151
 		return $this;
Please login to merge, or discard this patch.
Braces   +20 added lines, -16 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	public function setStyle($value) {
48
-		foreach ( $this->elements as $element )
49
-			$element->setStyle($value);
48
+		foreach ( $this->elements as $element ) {
49
+					$element->setStyle($value);
50
+		}
50 51
 	}
51 52
 
52 53
 	private function dropdownAsButton($bt) {
@@ -71,16 +72,18 @@  discard block
 block discarded – undo
71 72
 		} elseif ($element instanceof HtmlButton) {
72 73
 			$this->elements[]=$element;
73 74
 		} elseif (is_array($element)) {
74
-			if (array_key_exists("glyph", $element))
75
-				$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
76
-			elseif (array_key_exists("btnCaption", $element)) {
77
-				if (array_key_exists("split", $element))
78
-					$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
79
-				else
80
-					$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
75
+			if (array_key_exists("glyph", $element)) {
76
+							$bt=new HtmlGlyphButton($this->identifier."-button-".$iid);
77
+			} elseif (array_key_exists("btnCaption", $element)) {
78
+				if (array_key_exists("split", $element)) {
79
+									$bt=new HtmlSplitbutton($this->identifier."-dropdown-".$iid);
80
+				} else {
81
+									$bt=new HtmlDropdown($this->identifier."-dropdown-".$iid);
82
+				}
81 83
 				$this->dropdownAsButton($bt);
82
-			} else
83
-				$bt=new HtmlButton($this->identifier."-button-".$iid);
84
+			} else {
85
+							$bt=new HtmlButton($this->identifier."-button-".$iid);
86
+			}
84 87
 			$bt->fromArray($element);
85 88
 			$this->elements[]=$bt;
86 89
 			$result=$bt;
@@ -111,8 +114,9 @@  discard block
 block discarded – undo
111 114
 	public function setAlignment($value) {
112 115
 		if (is_int($value)) {
113 116
 			$value=CssRef::alignment("btn-group")[$value];
114
-		} else
115
-			$value="btn-group-".$value;
117
+		} else {
118
+					$value="btn-group-".$value;
119
+		}
116 120
 		if (strstr($value, "justified")) {
117 121
 			foreach ( $this->elements as $element ) {
118 122
 				$element->wrap('<div class="btn-group" role="group">', '</div>');
@@ -127,9 +131,9 @@  discard block
 block discarded – undo
127 131
 	 * @return HtmlButton
128 132
 	 */
129 133
 	public function getElement($index) {
130
-		if (is_int($index))
131
-			return $this->elements[$index];
132
-		else {
134
+		if (is_int($index)) {
135
+					return $this->elements[$index];
136
+		} else {
133 137
 			$elm=$this->getElementById($index, $this->elements);
134 138
 			return $elm;
135 139
 		}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlButtontoolbar.php 3 patches
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,11 @@  discard block
 block discarded – undo
12 12
 
13 13
 class HtmlButtontoolbar extends HtmlButtongroups {
14 14
 
15
+	/**
16
+	 * @param string $identifier
17
+	 * @param string $cssStyle
18
+	 * @param string $size
19
+	 */
15 20
 	public function __construct($identifier, $elements=array(), $cssStyle=NULL, $size=NULL, $tagName="div") {
16 21
 		parent::__construct($identifier, $elements, $cssStyle, $size, $tagName);
17 22
 		$this->setClass("btn-toolbar");
@@ -57,7 +62,7 @@  discard block
 block discarded – undo
57 62
 
58 63
 	/**
59 64
 	 * return the Buttongroups at position $index
60
-	 * @return \Ajax\bootstrap\html\HtmlButtongroups
65
+	 * @return HtmlButton
61 66
 	 */
62 67
 	public function getGroup($index) {
63 68
 		return parent::getElement($index);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,15 +79,15 @@
 block discarded – undo
79 79
 		$element=null;
80 80
 		$i=0;
81 81
 		if (is_int($index)) {
82
-			$elements=array ();
83
-			foreach ( $this->elements as $group ) {
82
+			$elements=array();
83
+			foreach ($this->elements as $group) {
84 84
 				$elements=array_merge($elements, $group->getElements());
85 85
 			}
86 86
 			if ($index<sizeof($elements)) {
87 87
 				$element=$elements [$index];
88 88
 			}
89 89
 		} else {
90
-			while ( $element==null&&$i<sizeof($this->elements) ) {
90
+			while ($element==null && $i<sizeof($this->elements)) {
91 91
 				$element=$this->elements [$i]->getElement($index);
92 92
 				$i++;
93 93
 			}
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	private function getLastButtonGroup() {
48 48
 		$nb=sizeof($this->elements);
49
-		if ($nb>0)
50
-			$bg=$this->elements [$nb-1];
51
-		else {
49
+		if ($nb>0) {
50
+					$bg=$this->elements [$nb-1];
51
+		} else {
52 52
 			$bg=new HtmlButtongroups($this->identifier."-buttongroups-".$nb);
53 53
 			$this->elements []=$bg;
54 54
 		}
@@ -66,8 +66,9 @@  discard block
 block discarded – undo
66 66
 	public function getLastGroup() {
67 67
 		$bg=null;
68 68
 		$nb=sizeof($this->elements);
69
-		if ($nb>0)
70
-			$bg=$this->elements [$nb-1];
69
+		if ($nb>0) {
70
+					$bg=$this->elements [$nb-1];
71
+		}
71 72
 		return $bg;
72 73
 	}
73 74
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlCarousel.php 4 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@  discard block
 block discarded – undo
23 23
 	protected $_base="";
24 24
 	protected $_glyphs=array ();
25 25
 
26
+	/**
27
+	 * @param string $identifier
28
+	 */
26 29
 	public function __construct($identifier, $images=NULL) {
27 30
 		parent::__construct($identifier);
28 31
 		$this->_template=include 'templates/tplCarousel.php';
@@ -61,7 +64,7 @@  discard block
 block discarded – undo
61 64
 	 *
62 65
 	 * @param string $caption
63 66
 	 * @param string $sens
64
-	 * @return HtmlCarouselControl|string
67
+	 * @return HtmlCarouselControl
65 68
 	 */
66 69
 	private function createControl($caption="next", $sens="left") {
67 70
 		$control=new HtmlCarouselControl($sens."-ctrl-".$this->identifier);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
  * @version 1.001
17 17
  */
18 18
 class HtmlCarousel extends BaseHtml {
19
-	protected $indicators=array ();
20
-	protected $slides=array ();
19
+	protected $indicators=array();
20
+	protected $slides=array();
21 21
 	protected $leftControl="";
22 22
 	protected $rightControl="";
23 23
 	protected $_base="";
24
-	protected $_glyphs=array ();
24
+	protected $_glyphs=array();
25 25
 
26 26
 	public function __construct($identifier, $images=NULL) {
27 27
 		parent::__construct($identifier);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	public function setBase($_base) {
41
-		foreach ($this->slides as $slide){
41
+		foreach ($this->slides as $slide) {
42 42
 			$imgSrc=$slide->getImageSrc();
43 43
 			$slide->setImageSrc(str_replace($this->_base.$imgSrc, $_base.$imgSrc, $imgSrc));
44 44
 		}
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 
95 95
 	public function addImage($imageSrc, $imageAlt="", $caption=NULL, $description=NULL) {
96
-		if(is_array($imageSrc)){
97
-			$this->addImage($imageSrc[0],@$imageSrc[1],@$imageSrc[2],@$imageSrc[3]);
98
-		}else{
96
+		if (is_array($imageSrc)) {
97
+			$this->addImage($imageSrc[0], @$imageSrc[1], @$imageSrc[2], @$imageSrc[3]);
98
+		} else {
99 99
 			$image=new HtmlCarouselItem("item-".$this->identifier);
100 100
 			$image->setImageSrc($this->_base.$imageSrc);
101 101
 			$image->setImageAlt($imageAlt);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function fromArray($array) {
120 120
 		if (is_array($array) && sizeof($array)>0) {
121
-			foreach ( $array as $value ) {
121
+			foreach ($array as $value) {
122 122
 				if (is_array($value)) {
123 123
 					$this->addImage($value ["src"], @$value ["alt"], @$value ["caption"], @$value ["description"]);
124 124
 				} else {
Please login to merge, or discard this patch.
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,27 +75,30 @@
 block discarded – undo
75 75
 	}
76 76
 
77 77
 	private function getGlyph($sens="left") {
78
-		if (array_key_exists($sens, $this->_glyphs))
79
-			return $this->_glyphs [$sens];
78
+		if (array_key_exists($sens, $this->_glyphs)) {
79
+					return $this->_glyphs [$sens];
80
+		}
80 81
 		return "glyphicon-chevron-".$sens;
81 82
 	}
82 83
 
83 84
 	public function setRightGlyph($glyphicon) {
84 85
 		$glyphs=CssRef::glyphIcons();
85
-		if (array_search($glyphicon, $glyphs)!==false)
86
-			$this->_glyphs ["right"]=$glyphicon;
86
+		if (array_search($glyphicon, $glyphs)!==false) {
87
+					$this->_glyphs ["right"]=$glyphicon;
88
+		}
87 89
 	}
88 90
 
89 91
 	public function setLeftGlyph($glyphicon) {
90 92
 		$glyphs=CssRef::glyphIcons();
91
-		if (array_search($glyphicon, $glyphs)!==false)
92
-			$this->_glyphs ["left"]=$glyphicon;
93
+		if (array_search($glyphicon, $glyphs)!==false) {
94
+					$this->_glyphs ["left"]=$glyphicon;
95
+		}
93 96
 	}
94 97
 
95 98
 	public function addImage($imageSrc, $imageAlt="", $caption=NULL, $description=NULL) {
96 99
 		if(is_array($imageSrc)){
97 100
 			$this->addImage($imageSrc[0],@$imageSrc[1],@$imageSrc[2],@$imageSrc[3]);
98
-		}else{
101
+		} else{
99 102
 			$image=new HtmlCarouselItem("item-".$this->identifier);
100 103
 			$image->setImageSrc($this->_base.$imageSrc);
101 104
 			$image->setImageAlt($imageAlt);
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
6 6
 use Ajax\JsUtils;
7 7
 use Ajax\service\JArray;
8
-
9 8
 use Ajax\semantic\html\base\constants\State;
10 9
 
11 10
 class HtmlProgress extends HtmlSemDoubleElement {
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlDropdown.php 3 patches
Doc Comments   +12 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@  discard block
 block discarded – undo
22 22
 	/**
23 23
 	 *
24 24
 	 * @param string $identifier the id
25
+	 * @param string $cssStyle
25 26
 	 */
26 27
 	public function __construct($identifier, $value="", $items=array(), $cssStyle=null, $onClick=null) {
27 28
 		parent::__construct($identifier, "", $cssStyle, $onClick);
@@ -45,7 +46,7 @@  discard block
 block discarded – undo
45 46
 	/**
46 47
 	 * define the button style
47 48
 	 * avaible values : "btn-default","btn-primary","btn-success","btn-info","btn-warning","btn-danger"
48
-	 * @param string|int $cssStyle
49
+	 * @param string $cssStyle
49 50
 	 * @return \Ajax\bootstrap\html\HtmlDropdown default : "btn-default"
50 51
 	 */
51 52
 	public function setStyle($cssStyle) {
@@ -149,10 +150,16 @@  discard block
 block discarded – undo
149 150
 		return $this->items [$index];
150 151
 	}
151 152
 
153
+	/**
154
+	 * @param string $value
155
+	 */
152 156
 	public function setBtnClass($value) {
153 157
 		$this->class=$value;
154 158
 	}
155 159
 
160
+	/**
161
+	 * @param string $value
162
+	 */
156 163
 	public function setMClass($value) {
157 164
 		$this->mClass=$value;
158 165
 	}
@@ -183,6 +190,7 @@  discard block
 block discarded – undo
183 190
 	/**
184 191
 	 * Sets the tagName's dropdown
185 192
 	 * @see \Ajax\bootstrap\html\BaseHtml::setTagName()
193
+	 * @param string $tagName
186 194
 	 */
187 195
 	public function setTagName($tagName) {
188 196
 		if ($tagName=="button")
@@ -194,6 +202,9 @@  discard block
 block discarded – undo
194 202
 		return $this->compile();
195 203
 	}
196 204
 
205
+	/**
206
+	 * @param string $btnCaption
207
+	 */
197 208
 	public function setBtnCaption($btnCaption) {
198 209
 		$this->btnCaption=$btnCaption;
199 210
 		return $this;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	protected $class="dropdown-toggle";
18 18
 	protected $mClass="dropdown";
19 19
 	protected $mTagName="div";
20
-	protected $items=array ();
20
+	protected $items=array();
21 21
 
22 22
 	/**
23 23
 	 *
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	 * @return HtmlDropdownItem
88 88
 	 */
89 89
 	public function addItem($caption, $href="#") {
90
-		if($caption instanceof HtmlDropdownItem){
90
+		if ($caption instanceof HtmlDropdownItem) {
91 91
 			$item=$caption;
92
-		}else{
92
+		} else {
93 93
 			$iid=$this->getItemsCount()+1;
94 94
 			$item=new HtmlDropdownItem($this->identifier."-dropdown-item-".$iid);
95 95
 			$item->setCaption($caption)->setHref($href);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	public function addItems($items) {
110 110
 		$iid=$this->getItemsCount()+1;
111 111
 		if (is_array($items)) {
112
-			foreach ( $items as $item ) {
112
+			foreach ($items as $item) {
113 113
 				if (is_string($item)) {
114 114
 					$this->addItem($item);
115 115
 				} else if (is_array($item)) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	}
137 137
 
138 138
 	public function setItems($items) {
139
-		$this->items=array ();
139
+		$this->items=array();
140 140
 		$this->addItems($items);
141 141
 	}
142 142
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public function run(JsUtils $js) {
173 173
 		if ($this->getProperty("role")==="nav") {
174
-			foreach ( $this->items as $dropdownItem ) {
174
+			foreach ($this->items as $dropdownItem) {
175 175
 				$dropdownItem->runNav($js);
176 176
 			}
177 177
 		}
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
 	/* (non-PHPdoc)
264 264
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
265 265
 	 */
266
-	public function on($event, $jsCode, $stopPropagation = false, $preventDefault = false) {
267
-		foreach ($this->items as $item){
268
-			$item->on($event, $jsCode,$stopPropagation,$preventDefault);
266
+	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
267
+		foreach ($this->items as $item) {
268
+			$item->on($event, $jsCode, $stopPropagation, $preventDefault);
269 269
 		}
270 270
 	}
271 271
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	public function addItem($caption, $href="#") {
90 90
 		if($caption instanceof HtmlDropdownItem){
91 91
 			$item=$caption;
92
-		}else{
92
+		} else{
93 93
 			$iid=$this->getItemsCount()+1;
94 94
 			$item=new HtmlDropdownItem($this->identifier."-dropdown-item-".$iid);
95 95
 			$item->setCaption($caption)->setHref($href);
@@ -129,10 +129,11 @@  discard block
 block discarded – undo
129 129
 	 * @see BaseHtml::fromArray()
130 130
 	 */
131 131
 	public function fromArray($array) {
132
-		if (array_keys($array)!==range(0, count($array)-1))
133
-			return parent::fromArray($array);
134
-		else
135
-			return $this->addItems($array);
132
+		if (array_keys($array)!==range(0, count($array)-1)) {
133
+					return parent::fromArray($array);
134
+		} else {
135
+					return $this->addItems($array);
136
+		}
136 137
 	}
137 138
 
138 139
 	public function setItems($items) {
@@ -185,8 +186,9 @@  discard block
 block discarded – undo
185 186
 	 * @see \Ajax\bootstrap\html\BaseHtml::setTagName()
186 187
 	 */
187 188
 	public function setTagName($tagName) {
188
-		if ($tagName=="button")
189
-			$this->class="btn dropdown-toggle";
189
+		if ($tagName=="button") {
190
+					$this->class="btn dropdown-toggle";
191
+		}
190 192
 		return parent::setTagName($tagName);
191 193
 	}
192 194
 
@@ -204,8 +206,9 @@  discard block
 block discarded – undo
204 206
 	}
205 207
 
206 208
 	public function setAlignment($alignment) {
207
-		if (is_int($alignment))
208
-			$alignment="dropdown-menu-".CssRef::alignment()[$alignment];
209
+		if (is_int($alignment)) {
210
+					$alignment="dropdown-menu-".CssRef::alignment()[$alignment];
211
+		}
209 212
 		return $this->addToMemberCtrl($this->class, $alignment, CssRef::alignment());
210 213
 	}
211 214
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlForm.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -87,6 +87,9 @@
 block discarded – undo
87 87
 		return $result;
88 88
 	}
89 89
 
90
+	/**
91
+	 * @return string
92
+	 */
90 93
 	private function getPrefix($element) {
91 94
 		$result="input_text";
92 95
 		foreach ( $this->formElementsPrefix as $k => $v ) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 	public function __construct($identifier) {
16 16
 		parent::__construct($identifier, "form");
17 17
 		$this->_template='<form id="%identifier%" name="%identifier%" %properties%>%content%</form>';
18
-		$this->futureElements=array ();
19
-		$this->formGroups=array ();
18
+		$this->futureElements=array();
19
+		$this->formGroups=array();
20 20
 	}
21 21
 
22 22
 	/*
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
27 27
 		if (isset($js)) {
28 28
 			$this->formElementsPrefix=$js->config()->getVar("formElementsPrefix");
29
-			foreach ( $this->futureElements as $futureElement ) {
29
+			foreach ($this->futureElements as $futureElement) {
30 30
 				$futureElementValue=$this->getPrefix($futureElement);
31 31
 				$futureElementValues=explode("_", $futureElementValue);
32
-				switch($futureElementValues [0]) {
32
+				switch ($futureElementValues [0]) {
33 33
 					case "input":
34 34
 						$control=new HtmlInput($futureElement);
35 35
 						$control->setClass("form-control");
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 				$this->addElement($control);
62 62
 			}
63 63
 		}
64
-		foreach ( $this->formGroups as $group ) {
64
+		foreach ($this->formGroups as $group) {
65 65
 			$this->addContent($group);
66 66
 		}
67 67
 		return parent::compile($js, $view);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 	private function getPrefix($element) {
91 91
 		$result="input_text";
92
-		foreach ( $this->formElementsPrefix as $k => $v ) {
92
+		foreach ($this->formElementsPrefix as $k => $v) {
93 93
 			if (Text::startsWith($element, $k)) {
94 94
 				$result=$v;
95 95
 				break;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 	public function getElement($name) {
121 121
 		$element=null;
122
-		foreach ( $this->formGroups as $group ) {
122
+		foreach ($this->formGroups as $group) {
123 123
 		}
124 124
 		return $element;
125 125
 	}
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::fromArray()
130 130
 	 */
131 131
 	public function fromArray($array) {
132
-		foreach ( $array as $value ) {
132
+		foreach ($array as $value) {
133 133
 			if (is_string($value)) {
134 134
 				$this->futureElements []=$value;
135 135
 			}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,9 @@
 block discarded – undo
99 99
 	}
100 100
 
101 101
 	public function addGroup($identifier="") {
102
-		if ($identifier==="")
103
-			$identifier="form-".$this->identifier;
102
+		if ($identifier==="") {
103
+					$identifier="form-".$this->identifier;
104
+		}
104 105
 		$group=new HtmlBsDoubleElement($identifier);
105 106
 		$group->setTagName("div");
106 107
 		$group->setClass("form-group");
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
6 6
 use Ajax\JsUtils;
7 7
 use Ajax\service\JArray;
8
-
9 8
 use Ajax\semantic\html\base\constants\State;
10 9
 
11 10
 class HtmlProgress extends HtmlSemDoubleElement {
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlGridsystem.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -16,6 +16,10 @@
 block discarded – undo
16 16
 class HtmlGridSystem extends HtmlBsDoubleElement {
17 17
 	private $rows;
18 18
 	
19
+	/**
20
+	 * @param string $identifier
21
+	 * @param integer $numCols
22
+	 */
19 23
 	public function __construct($identifier,$numRows=1,$numCols=NULL){
20 24
 		parent::__construct($identifier,"div");
21 25
 		$this->setProperty("class", "container-fluid");
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 class HtmlGridSystem extends HtmlBsDoubleElement {
17 17
 	private $rows;
18 18
 	
19
-	public function __construct($identifier,$numRows=1,$numCols=NULL){
20
-		parent::__construct($identifier,"div");
19
+	public function __construct($identifier, $numRows=1, $numCols=NULL) {
20
+		parent::__construct($identifier, "div");
21 21
 		$this->setProperty("class", "container-fluid");
22 22
 		$this->rows=array();
23
-		$this->setNumRows($numRows,$numCols);
23
+		$this->setNumRows($numRows, $numCols);
24 24
 	}
25 25
 	
26 26
 	/**
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 * @param int $numCols 
29 29
 	 * @return \Ajax\bootstrap\html\content\HtmlGridRow
30 30
 	 */
31
-	public function addRow($numCols=NULL){
32
-		$row=new HtmlGridRow($this->identifier."-row-".(sizeof($this->rows)+1),$numCols);
31
+	public function addRow($numCols=NULL) {
32
+		$row=new HtmlGridRow($this->identifier."-row-".(sizeof($this->rows)+1), $numCols);
33 33
 		$this->rows[]=$row;
34 34
 		return $row;
35 35
 	}
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	 * @param boolean $force add the row at $index if true
41 41
 	 * @return \Ajax\bootstrap\html\content\HtmlGridRow
42 42
 	 */
43
-	public function getRow($index,$force=true){
44
-		if($index<sizeof($this->rows)){
43
+	public function getRow($index, $force=true) {
44
+		if ($index<sizeof($this->rows)) {
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force) {
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 	 * @param int $numCols
57 57
 	 * @return \Ajax\bootstrap\html\HtmlGridSystem
58 58
 	 */
59
-	public function setNumRows($numRows,$numCols=NULL){
60
-		for($i=sizeof($this->rows);$i<$numRows;$i++){
59
+	public function setNumRows($numRows, $numCols=NULL) {
60
+		for ($i=sizeof($this->rows); $i<$numRows; $i++) {
61 61
 			$this->addRow($numCols);
62 62
 		}
63 63
 		return $this;
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 	 * @param $force add the cell at $row,$col if true
70 70
 	 * @return HtmlGridCol
71 71
 	 */
72
-	public function getCell($row,$col,$force=true){
73
-		$row=$this->getRow($row,$force);
74
-		if(isset($row)){
75
-			$col=$row->getCol($col,$force);
72
+	public function getCell($row, $col, $force=true) {
73
+		$row=$this->getRow($row, $force);
74
+		if (isset($row)) {
75
+			$col=$row->getCol($col, $force);
76 76
 		}
77 77
 		return $col;
78 78
 	}
@@ -82,22 +82,22 @@  discard block
 block discarded – undo
82 82
 	 * @param int $col
83 83
 	 * @return HtmlGridCol
84 84
 	 */
85
-	public function getCellAt($row,$col,$force=true){
86
-		$row=$this->getRow($row,$force);
87
-		if(isset($row)){
88
-			$col=$row->getColAt($col,$force);
85
+	public function getCellAt($row, $col, $force=true) {
86
+		$row=$this->getRow($row, $force);
87
+		if (isset($row)) {
88
+			$col=$row->getColAt($col, $force);
89 89
 		}
90 90
 		return $col;
91 91
 	}
92 92
 	
93 93
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
94
-		foreach ($this->rows as $row){
94
+		foreach ($this->rows as $row) {
95 95
 			$this->addContent($row);
96 96
 		}
97
-		return parent::compile($js,$view);
97
+		return parent::compile($js, $view);
98 98
 	}
99
-	public function setContentForAll($content){
100
-		foreach ($this->rows as $row){
99
+	public function setContentForAll($content) {
100
+		foreach ($this->rows as $row) {
101 101
 			$row->setContentForAll($content);
102 102
 		}
103 103
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	public function getRow($index,$force=true){
44 44
 		if($index<sizeof($this->rows)){
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force){
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
Please login to merge, or discard this patch.