Completed
Push — master ( 9e5b24...8af853 )
by Jean-Christophe
08:21
created
Ajax/semantic/html/collections/HtmlMenu.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	public function __construct($identifier, $items=array()) {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->setClass("ui menu");
18
-		foreach ($items as $item){
18
+		foreach ($items as $item) {
19 19
 			$this->addItem($item);
20 20
 		}
21 21
 	}
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
 	 * @param string $type one of text,item
26 26
 	 * @return \Ajax\semantic\html\collections\HtmlMenu
27 27
 	 */
28
-	public function setType($type=""){
29
-		return $this->addToPropertyCtrl("class", $type, array("","item","text"));
28
+	public function setType($type="") {
29
+		return $this->addToPropertyCtrl("class", $type, array("", "item", "text"));
30 30
 	}
31 31
 
32
-	public function setActiveItem($index){
32
+	public function setActiveItem($index) {
33 33
 		$item=$this->getItem($index);
34
-		if($item!==null){
34
+		if ($item!==null) {
35 35
 			$item->addToProperty("class", "active");
36 36
 		}
37 37
 		return $this;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * {@inheritDoc}
42 42
 	 * @see \Ajax\common\html\html5\HtmlCollection::addItem()
43 43
 	 */
44
-	public function addItem($item){
44
+	public function addItem($item) {
45 45
 		$item=parent::addItem($item);
46 46
 		$item->addToProperty("class", "item");
47 47
 	}
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 	 * @see \Ajax\common\html\html5\HtmlCollection::createItem()
51 51
 	 */
52 52
 	protected function createItem($value) {
53
-		$itemO=new HtmlLink("item-".\sizeof($this->content),"",$value);
53
+		$itemO=new HtmlLink("item-".\sizeof($this->content), "", $value);
54 54
 		return $itemO->setClass("item");
55 55
 	}
56 56
 
57
-	public function setInverted(){
57
+	public function setInverted() {
58 58
 		return $this->addToProperty("class", "inverted");
59 59
 	}
60 60
 }
61 61
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +4 added lines, -4 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,7 +18,7 @@  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
 		$this->addToProperty("class", "flowing");
23 23
 	}
24 24
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	 * {@inheritDoc}
27 27
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
28 28
 	 */
29
-	public function run(JsUtils $js){
29
+	public function run(JsUtils $js) {
30 30
 		$this->params["popup"]="#".$this->identifier;
31
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->params);
31
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->params);
32 32
 	}
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -47,20 +47,20 @@  discard block
 block discarded – undo
47 47
 	 * @return \Ajax\semantic\html\HtmlButton default : ""
48 48
 	 */
49 49
 	public function setStyle($cssStyle) {
50
-		return $this->addToProperty("class",$cssStyle);
50
+		return $this->addToProperty("class", $cssStyle);
51 51
 	}
52 52
 
53
-	public function setFocusable(){
53
+	public function setFocusable() {
54 54
 		$this->setProperty("tabindex", "0");
55 55
 	}
56 56
 
57
-	public function setAnimated($content,$animation=""){
57
+	public function setAnimated($content, $animation="") {
58 58
 		$this->setTagName("div");
59 59
 		$this->addToProperty("class", "animated ".$animation);
60
-		$visible=new HtmlSemDoubleElement("visible-".$this->identifier,"div");
60
+		$visible=new HtmlSemDoubleElement("visible-".$this->identifier, "div");
61 61
 		$visible->setClass("visible content");
62 62
 		$visible->setContent($this->content);
63
-		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier,"div");
63
+		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier, "div");
64 64
 		$hidden->setClass("hidden content");
65 65
 		$hidden->setContent($content);
66 66
 		$this->content=$visible.$hidden;
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
 	 * @param string|HtmlIcon $icon
71 71
 	 * @return \Ajax\semantic\html\elements\HtmlButton
72 72
 	 */
73
-	public function asIcon($icon){
73
+	public function asIcon($icon) {
74 74
 		$iconO=$icon;
75
-		if(\is_string($icon)){
75
+		if (\is_string($icon)) {
76 76
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
77 77
 		}
78 78
 		$this->addToProperty("class", "icon");
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 	 * @param string $before
87 87
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
88 88
 	 */
89
-	public function addLabel($caption,$before=false){
89
+	public function addLabel($caption, $before=false) {
90 90
 		$this->tagName="div";
91 91
 		$this->addToProperty("class", "labeled");
92
-		$this->content=new HtmlButton("button-".$this->identifier,$this->content);
92
+		$this->content=new HtmlButton("button-".$this->identifier, $this->content);
93 93
 		$this->content->setTagName("div");
94
-		$label=new HtmlLabel("label-".$this->identifier,$caption,"a");
94
+		$label=new HtmlLabel("label-".$this->identifier, $caption, "a");
95 95
 		$label->setBasic();
96
-		$this->addContent($label,$before);
96
+		$this->addContent($label, $before);
97 97
 		return $label;
98 98
 	}
99 99
 	/*
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function fromArray($array) {
104 104
 		$array=parent::fromArray($array);
105
-		foreach ( $array as $key => $value ) {
105
+		foreach ($array as $key => $value) {
106 106
 			$this->setProperty($key, $value);
107 107
 		}
108 108
 		return $array;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	 *  show it is currently the active user selection
113 113
 	 * @return \Ajax\semantic\html\elements\HtmlButton
114 114
 	 */
115
-	public function setActive(){
115
+	public function setActive() {
116 116
 		return $this->addToProperty("class", "active");
117 117
 	}
118 118
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 * hint towards a positive consequence
121 121
 	 * @return \Ajax\semantic\html\elements\HtmlButton
122 122
 	 */
123
-	public function setPositive(){
123
+	public function setPositive() {
124 124
 		return $this->addToProperty("class", "positive");
125 125
 	}
126 126
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 * hint towards a negative consequence
129 129
 	 * @return \Ajax\semantic\html\elements\HtmlButton
130 130
 	 */
131
-	public function setNegative(){
131
+	public function setNegative() {
132 132
 		return $this->addToProperty("class", "negative");
133 133
 	}
134 134
 
@@ -136,14 +136,14 @@  discard block
 block discarded – undo
136 136
 	 * formatted to toggle on/off
137 137
 	 * @return \Ajax\semantic\html\elements\HtmlButton
138 138
 	 */
139
-	public function setToggle(){
139
+	public function setToggle() {
140 140
 		return $this->addToProperty("class", "toggle");
141 141
 	}
142 142
 
143 143
 	/**
144 144
 	 * @return \Ajax\semantic\html\elements\HtmlButton
145 145
 	 */
146
-	public function setCircular(){
146
+	public function setCircular() {
147 147
 		return $this->addToProperty("class", "circular");
148 148
 	}
149 149
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 *  button is less pronounced
152 152
 	 * @return \Ajax\semantic\html\elements\HtmlButton
153 153
 	 */
154
-	public function setBasic(){
154
+	public function setBasic() {
155 155
 		return $this->addToProperty("class", "basic");
156 156
 	}
157 157
 }
158 158
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/components/Popup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		return $this->setParam("onShow", "%function(){".$jsCode."}%");
31 31
 	}
32 32
 
33
-	public function setExclusive($value){
33
+	public function setExclusive($value) {
34 34
 		return $this->setParam("exclusive", $value);
35 35
 	}
36 36
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param string $popup the css selector of the popup
40 40
 	 * @return \Ajax\semantic\components\Popup
41 41
 	 */
42
-	public function setPopup($popup){
42
+	public function setPopup($popup) {
43 43
 		return $this->setParam("popup", $popup);
44 44
 	}
45 45
 	//TODO other events implementation
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * @param string $identifier
60 60
 	 * @param string $icon
61 61
 	 */
62
-	public function htmlIcon($identifier,$icon){
62
+	public function htmlIcon($identifier, $icon) {
63 63
 		return $this->addHtmlComponent(new HtmlIcon($identifier, $icon));
64 64
 	}
65 65
 
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
 	 * @param string $size
69 69
 	 * @param array $icons
70 70
 	 */
71
-	public function htmlIconGroups($identifier,$size="",$icons=array()){
72
-		$group=new HtmlIconGroups($identifier,$size);
73
-		if(JArray::isAssociative($icons)){
74
-			foreach ($icons as $icon=>$size){
75
-				$group->add($icon,$size);
71
+	public function htmlIconGroups($identifier, $size="", $icons=array()) {
72
+		$group=new HtmlIconGroups($identifier, $size);
73
+		if (JArray::isAssociative($icons)) {
74
+			foreach ($icons as $icon=>$size) {
75
+				$group->add($icon, $size);
76 76
 			}
77
-		}else{
78
-			foreach ($icons as $icon){
77
+		}else {
78
+			foreach ($icons as $icon) {
79 79
 				$group->add($icon);
80 80
 			}
81 81
 		}
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 	 * @param array $elements
88 88
 	 * @param boolean $asIcons
89 89
 	 */
90
-	public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){
91
-		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons));
90
+	public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) {
91
+		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons));
92 92
 	}
93 93
 
94 94
 	/**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * @param string $identifier
97 97
 	 * @param string $content
98 98
 	 */
99
-	public function htmlContainer($identifier,$content=""){
99
+	public function htmlContainer($identifier, $content="") {
100 100
 		return $this->addHtmlComponent(new HtmlContainer($identifier, $content));
101 101
 	}
102 102
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 	 * @param string $identifier
105 105
 	 * @param string $content
106 106
 	 */
107
-	public function htmlDivider($identifier,$content="",$tagName="div"){
108
-		return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName));
107
+	public function htmlDivider($identifier, $content="", $tagName="div") {
108
+		return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName));
109 109
 	}
110 110
 
111 111
 	/**
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
 	 * @param string $content
114 114
 	 * @param string $tagName
115 115
 	 */
116
-	public function htmlLabel($identifier,$content="",$tagName="div"){
117
-		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName));
116
+	public function htmlLabel($identifier, $content="", $tagName="div") {
117
+		return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName));
118 118
 	}
119 119
 
120 120
 	/**
121 121
 	 * @param string $identifier
122 122
 	 * @param array $items
123 123
 	 */
124
-	public function htmlMenu($identifier,$items=array()){
125
-		return $this->addHtmlComponent(new HtmlMenu($identifier,$items));
124
+	public function htmlMenu($identifier, $items=array()) {
125
+		return $this->addHtmlComponent(new HtmlMenu($identifier, $items));
126 126
 	}
127 127
 
128 128
 	/**
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 	 * @param string $value
131 131
 	 * @param array $items
132 132
 	 */
133
-	public function htmlDropdown($identifier, $value="", $items=array()){
134
-		return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items));
133
+	public function htmlDropdown($identifier, $value="", $items=array()) {
134
+		return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items));
135 135
 	}
136 136
 
137 137
 	/**
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 	 * @param string $identifier
140 140
 	 * @param string $content
141 141
 	 */
142
-	public function htmlMessage($identifier, $content=""){
143
-		return $this->addHtmlComponent(new HtmlMessage($identifier,$content));
142
+	public function htmlMessage($identifier, $content="") {
143
+		return $this->addHtmlComponent(new HtmlMessage($identifier, $content));
144 144
 	}
145 145
 
146 146
 	/**
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 	 * @param string $identifier
149 149
 	 * @param string $content
150 150
 	 */
151
-	public function htmlSegment($identifier, $content=""){
152
-		return $this->addHtmlComponent(new HtmlSegment($identifier,$content));
151
+	public function htmlSegment($identifier, $content="") {
152
+		return $this->addHtmlComponent(new HtmlSegment($identifier, $content));
153 153
 	}
154 154
 
155 155
 	/**
@@ -157,19 +157,19 @@  discard block
 block discarded – undo
157 157
 	 * @param string $identifier
158 158
 	 * @param array $items the segments
159 159
 	 */
160
-	public function htmlSegmentGroups($identifier, $items=array()){
161
-		return $this->addHtmlComponent(new HtmlSegmentGroups($identifier,$items));
160
+	public function htmlSegmentGroups($identifier, $items=array()) {
161
+		return $this->addHtmlComponent(new HtmlSegmentGroups($identifier, $items));
162 162
 	}
163 163
 
164 164
 	/**
165 165
 	 * @param string $identifier
166 166
 	 * @param mixed $content
167 167
 	 */
168
-	public function htmlPopup(BaseHtml $container,$identifier,$content){
169
-		return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content));
168
+	public function htmlPopup(BaseHtml $container, $identifier, $content) {
169
+		return $this->addHtmlComponent(new HtmlPopup($container, $identifier, $content));
170 170
 	}
171 171
 
172
-	public function htmlGrid($identifier,$numRows=1,$numCols=NULL){
173
-		return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols));
172
+	public function htmlGrid($identifier, $numRows=1, $numCols=NULL) {
173
+		return $this->addHtmlComponent(new HtmlGrid($identifier, $numRows, $numCols));
174 174
 	}
175 175
 }
176 176
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/Wide.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Ajax\semantic\html\base;
3 3
 	use Ajax\common\BaseEnum;
4 4
 abstract class Wide extends BaseEnum {
5
-	const W1="one", W2="two", W3="three", W4="four",W5="five", W6="six", W7="seven", W8="eight",W9="nine",W10="ten",W11="eleven",W12="twelve",W13="thirteen",W14="fourteen",W15="fifteen",W16="sixteen";
5
+	const W1="one", W2="two", W3="three", W4="four", W5="five", W6="six", W7="seven", W8="eight", W9="nine", W10="ten", W11="eleven", W12="twelve", W13="thirteen", W14="fourteen", W15="fifteen", W16="sixteen";
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlGridRow.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@  discard block
 block discarded – undo
10 10
  * @author jc
11 11
  * @version 1.001
12 12
  */
13
-class HtmlGridRow extends HtmlCollection{
13
+class HtmlGridRow extends HtmlCollection {
14 14
 
15 15
 	private $_colSize;
16
-	public function __construct( $identifier,$numCols=NULL,$colSizing=false){
17
-		parent::__construct( $identifier,"div");
16
+	public function __construct($identifier, $numCols=NULL, $colSizing=false) {
17
+		parent::__construct($identifier, "div");
18 18
 		$this->setClass("row");
19 19
 		$width=null;
20
-		if(isset($numCols)){
21
-			$numCols=min(16,$numCols);
22
-			$numCols=max(1,$numCols);
23
-			if($colSizing)
24
-				$width=(int)(16/$numCols);
20
+		if (isset($numCols)) {
21
+			$numCols=min(16, $numCols);
22
+			$numCols=max(1, $numCols);
23
+			if ($colSizing)
24
+				$width=(int) (16 / $numCols);
25 25
 			else
26
-				$this->_colSize=16/$numCols;
27
-			for ($i=0;$i<$numCols;$i++){
26
+				$this->_colSize=16 / $numCols;
27
+			for ($i=0; $i<$numCols; $i++) {
28 28
 				$this->addItem($width);
29 29
 			}
30 30
 		}
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 	 * @param int $width
36 36
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
37 37
 	 */
38
-	public function setWidth($width){
39
-		if(\is_int($width)){
38
+	public function setWidth($width) {
39
+		if (\is_int($width)) {
40 40
 			$width=Wide::getConstants()["W".$width];
41 41
 		}
42 42
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
43
-		return $this->addToPropertyCtrl("class", "column",array("column"));
43
+		return $this->addToPropertyCtrl("class", "column", array("column"));
44 44
 	}
45 45
 
46 46
 	/**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param int $index
49 49
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
50 50
 	 */
51
-	public function getCol($index){
51
+	public function getCol($index) {
52 52
 		return $this->getItem($index);
53 53
 	}
54 54
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * stretch the row contents to take up the entire column height
57 57
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
58 58
 	 */
59
-	public function setStretched(){
59
+	public function setStretched() {
60 60
 		return $this->addToProperty("class", "stretched");
61 61
 	}
62 62
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 * {@inheritDoc}
65 65
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
66 66
 	 */
67
-	protected function createItem($value){
68
-		$col=new HtmlGridCol($this->identifier."-col-".($this->count()+1),$value);
67
+	protected function createItem($value) {
68
+		$col=new HtmlGridCol($this->identifier."-col-".($this->count()+1), $value);
69 69
 		return $col;
70 70
 	}
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlGridCol.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
  * @author jc
11 11
  * @version 1.001
12 12
  */
13
-class HtmlGridCol extends HtmlSemDoubleElement{
14
-	public function __construct($identifier,$width){
15
-		parent::__construct($identifier,"div");
13
+class HtmlGridCol extends HtmlSemDoubleElement {
14
+	public function __construct($identifier, $width) {
15
+		parent::__construct($identifier, "div");
16 16
 		$this->setClass("column");
17
-		if(isset($width))
17
+		if (isset($width))
18 18
 			$this->setWidth($width);
19 19
 	}
20 20
 
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
 	 * @param int $width
24 24
 	 * @return \Ajax\semantic\html\content\HtmlGridCol
25 25
 	 */
26
-	public function setWidth($width){
27
-		if(\is_int($width)){
26
+	public function setWidth($width) {
27
+		if (\is_int($width)) {
28 28
 			$width=Wide::getConstants()["W".$width];
29 29
 		}
30 30
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
31
-		return $this->addToPropertyCtrl("class", "wide",array("wide"));
31
+		return $this->addToPropertyCtrl("class", "wide", array("wide"));
32 32
 	}
33 33
 
34 34
 	/**
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @param string $value left or right
37 37
 	 * @return \Ajax\semantic\html\content\HtmlGridCol
38 38
 	 */
39
-	public function setFloated($value="left"){
39
+	public function setFloated($value="left") {
40 40
 		return $this->addToProperty("class", $value." floated");
41 41
 	}
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlGrid.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,22 +11,22 @@  discard block
 block discarded – undo
11 11
  * @author jc
12 12
  * @version 1.001
13 13
  */
14
-class HtmlGrid extends HtmlCollection{
14
+class HtmlGrid extends HtmlCollection {
15 15
 
16 16
 	private $_createCols;
17 17
 	private $_colSizing=true;
18
-	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true){
19
-		parent::__construct( $identifier, "div");
18
+	public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=true) {
19
+		parent::__construct($identifier, "div");
20 20
 		$this->_createCols=$createCols;
21
-		if(isset($numCols)){
22
-			if($this->_createCols){
21
+		if (isset($numCols)) {
22
+			if ($this->_createCols) {
23 23
 				$this->_colSizing=false;
24 24
 			}
25 25
 			$cols=Wide::getConstants()["W".$numCols];
26 26
 			$this->setClass($cols." column");
27 27
 		}
28
-		$this->addToProperty("class","ui grid");
29
-		$this->setNumRows($numRows,$numCols);
28
+		$this->addToProperty("class", "ui grid");
29
+		$this->setNumRows($numRows, $numCols);
30 30
 	}
31 31
 
32 32
 	/**
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @param int $numCols
36 36
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
37 37
 	 */
38
-	public function setNumRows($numRows,$numCols=NULL){
38
+	public function setNumRows($numRows, $numCols=NULL) {
39 39
 		$count=$this->count();
40
-		for($i=$count;$i<$numRows;$i++){
40
+		for ($i=$count; $i<$numRows; $i++) {
41 41
 			$this->addItem($numCols);
42 42
 		}
43 43
 		return $this;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param int $index
49 49
 	 * @return \Ajax\semantic\html\collections\HtmlGridRow
50 50
 	 */
51
-	public function getRow($index){
51
+	public function getRow($index) {
52 52
 		return $this->getItem($index);
53 53
 	}
54 54
 
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 	 * @param int $col
58 58
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
59 59
 	 */
60
-	public function getCell($row,$col){
60
+	public function getCell($row, $col) {
61 61
 		$row=$this->getItem($row);
62
-		if(isset($row)){
62
+		if (isset($row)) {
63 63
 			$col=$row->getItem($col);
64 64
 		}
65 65
 		return $col;
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 	 * @param boolean $vertically
71 71
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
72 72
 	 */
73
-	public function setDivided($vertically=false){
74
-		$value=($vertically===true)?"vertically divided":"divided";
73
+	public function setDivided($vertically=false) {
74
+		$value=($vertically===true) ? "vertically divided" : "divided";
75 75
 		return $this->addToProperty("class", $value);
76 76
 	}
77 77
 
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 	 * @param boolean $internal true for internal cells
81 81
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
82 82
 	 */
83
-	public function setCelled($internal=false){
84
-		$value=($internal===true)?"internal celled":"celled";
83
+	public function setCelled($internal=false) {
84
+		$value=($internal===true) ? "internal celled" : "celled";
85 85
 		return $this->addToProperty("class", $value);
86 86
 	}
87 87
 
88
-	public function setEqualWidth(){
88
+	public function setEqualWidth() {
89 89
 		return $this->addToProperty("class", "equal width");
90 90
 	}
91 91
 
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 	 * {@inheritDoc}
94 94
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
95 95
 	 */
96
-	protected function createItem($value){
97
-		if($this->_createCols===false)
96
+	protected function createItem($value) {
97
+		if ($this->_createCols===false)
98 98
 			$value=null;
99
-		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing);
99
+		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1), $value, $this->_colSizing);
100 100
 		return $item;
101 101
 	}
102 102
 
Please login to merge, or discard this patch.