Completed
Push — master ( f832a7...a89656 )
by Fabio
12:54
created
framework/Web/UI/WebControls/TListItem.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 * @param boolean whether the item is enabled
59 59
 	 * @param boolean whether the item is selected
60 60
 	 */
61
-	public function __construct($text='',$value='',$enabled=true,$selected=false)
61
+	public function __construct($text='', $value='', $enabled=true, $selected=false)
62 62
 	{
63 63
 		$this->setText($text);
64 64
 		$this->setValue($value);
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
 	protected function _getZappableSleepProps(&$exprops)
76 76
 	{
77 77
 		parent::_getZappableSleepProps($exprops);
78
-		if ($this->_attributes===null)
79
-			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_attributes";
78
+		if($this->_attributes===null)
79
+			$exprops[]="\0Prado\Web\UI\WebControls\TListItem\0_attributes";
80 80
 		if($this->_text==='')
81
-			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_text";
81
+			$exprops[]="\0Prado\Web\UI\WebControls\TListItem\0_text";
82 82
 		if($this->_value==='')
83
-			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_value";
84
-		if ($this->_enabled===true)
85
-			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_enabled";
86
-		if ($this->_selected===false)
87
-			$exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_selected";
83
+			$exprops[]="\0Prado\Web\UI\WebControls\TListItem\0_value";
84
+		if($this->_enabled===true)
85
+			$exprops[]="\0Prado\Web\UI\WebControls\TListItem\0_enabled";
86
+		if($this->_selected===false)
87
+			$exprops[]="\0Prado\Web\UI\WebControls\TListItem\0_selected";
88 88
 	}
89 89
 
90 90
 	/**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 */
125 125
 	public function getText()
126 126
 	{
127
-		return $this->_text===''?$this->_value:$this->_text;
127
+		return $this->_text==='' ? $this->_value : $this->_text;
128 128
 	}
129 129
 
130 130
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public function getValue()
142 142
 	{
143
-		return $this->_value===''?$this->_text:$this->_value;
143
+		return $this->_value==='' ? $this->_text : $this->_value;
144 144
 	}
145 145
 
146 146
 	/**
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 */
167 167
 	public function getHasAttributes()
168 168
 	{
169
-		return $this->_attributes && $this->_attributes->getCount()>0;
169
+		return $this->_attributes && $this->_attributes->getCount() > 0;
170 170
 	}
171 171
 
172 172
 	/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public function hasAttribute($name)
177 177
 	{
178
-		return $this->_attributes?$this->_attributes->contains($name):false;
178
+		return $this->_attributes ? $this->_attributes->contains($name) : false;
179 179
 	}
180 180
 
181 181
 	/**
@@ -183,16 +183,16 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	public function getAttribute($name)
185 185
 	{
186
-		return $this->_attributes?$this->_attributes->itemAt($name):null;
186
+		return $this->_attributes ? $this->_attributes->itemAt($name) : null;
187 187
 	}
188 188
 
189 189
 	/**
190 190
 	 * @param string attribute name
191 191
 	 * @param string value of the attribute
192 192
 	 */
193
-	public function setAttribute($name,$value)
193
+	public function setAttribute($name, $value)
194 194
 	{
195
-		$this->getAttributes()->add($name,$value);
195
+		$this->getAttributes()->add($name, $value);
196 196
 	}
197 197
 
198 198
 	/**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 */
203 203
 	public function removeAttribute($name)
204 204
 	{
205
-		return $this->_attributes?$this->_attributes->remove($name):null;
205
+		return $this->_attributes ? $this->_attributes->remove($name) : null;
206 206
 	}
207 207
 }
208 208
 
Please login to merge, or discard this patch.