Completed
Push — namespace2 ( fc6e2b...8a6673 )
by Fabio
08:49
created
framework/Web/UI/ActiveControls/TEventTriggeredCallback.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
 	 */
65 65
 	protected function getTriggerOptions()
66 66
 	{
67
-		$options = parent::getTriggerOptions();
68
-		$name = preg_replace('/^on/', '', $this->getEventName());
69
-		$options['EventName'] = strtolower($name);
70
-		$options['StopEvent'] = $this->getPreventDefaultAction();
67
+		$options=parent::getTriggerOptions();
68
+		$name=preg_replace('/^on/', '', $this->getEventName());
69
+		$options['EventName']=strtolower($name);
70
+		$options['StopEvent']=$this->getPreventDefaultAction();
71 71
 		return $options;
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataListItemRenderer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function getHasStyle()
47 47
 	{
48
-		return $this->getViewState('Style',null)!==null;
48
+		return $this->getViewState('Style', null)!==null;
49 49
 	}
50 50
 
51 51
 	/**
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function getStyle()
55 55
 	{
56
-		if($style=$this->getViewState('Style',null))
56
+		if($style=$this->getViewState('Style', null))
57 57
 			return $style;
58 58
 		else
59 59
 		{
60 60
 			$style=$this->createStyle();
61
-			$this->setViewState('Style',$style,null);
61
+			$this->setViewState('Style', $style, null);
62 62
 			return $style;
63 63
 		}
64 64
 	}
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 	 * @param TEventParameter event parameter
79 79
 	 * @return boolean whether the event bubbling should stop here.
80 80
 	 */
81
-	public function bubbleEvent($sender,$param)
81
+	public function bubbleEvent($sender, $param)
82 82
 	{
83 83
 		if($param instanceof TCommandEventParameter)
84 84
 		{
85
-			$this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param));
85
+			$this->raiseBubbleEvent($this, new TDataListCommandEventParameter($this, $sender, $param));
86 86
 			return true;
87 87
 		}
88 88
 		else
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	protected function addAttributesToRender($writer)
111 111
 	{
112
-		if($style=$this->getViewState('Style',null))
112
+		if($style=$this->getViewState('Style', null))
113 113
 			$style->addAttributesToRender($writer);
114 114
 	}
115 115
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THyperLinkColumn.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function getText()
56 56
 	{
57
-		return $this->getViewState('Text','');
57
+		return $this->getViewState('Text', '');
58 58
 	}
59 59
 
60 60
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setText($value)
65 65
 	{
66
-		$this->setViewState('Text',$value,'');
66
+		$this->setViewState('Text', $value, '');
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function getDataTextField()
73 73
 	{
74
-		return $this->getViewState('DataTextField','');
74
+		return $this->getViewState('DataTextField', '');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setDataTextField($value)
81 81
 	{
82
-		$this->setViewState('DataTextField',$value,'');
82
+		$this->setViewState('DataTextField', $value, '');
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getDataTextFormatString()
89 89
 	{
90
-		return $this->getViewState('DataTextFormatString','');
90
+		return $this->getViewState('DataTextFormatString', '');
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setDataTextFormatString($value)
97 97
 	{
98
-		$this->setViewState('DataTextFormatString',$value,'');
98
+		$this->setViewState('DataTextFormatString', $value, '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function getImageHeight()
105 105
 	{
106
-		return $this->getViewState('ImageHeight','');
106
+		return $this->getViewState('ImageHeight', '');
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setImageHeight($value)
113 113
 	{
114
-		$this->setViewState('ImageHeight',$value,'');
114
+		$this->setViewState('ImageHeight', $value, '');
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getImageUrl()
121 121
 	{
122
-		return $this->getViewState('ImageUrl','');
122
+		return $this->getViewState('ImageUrl', '');
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function setImageUrl($value)
129 129
 	{
130
-		$this->setViewState('ImageUrl',$value,'');
130
+		$this->setViewState('ImageUrl', $value, '');
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getImageWidth()
137 137
 	{
138
-		return $this->getViewState('ImageWidth','');
138
+		return $this->getViewState('ImageWidth', '');
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setImageWidth($value)
145 145
 	{
146
-		$this->setViewState('ImageWidth',$value,'');
146
+		$this->setViewState('ImageWidth', $value, '');
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getNavigateUrl()
153 153
 	{
154
-		return $this->getViewState('NavigateUrl','');
154
+		return $this->getViewState('NavigateUrl', '');
155 155
 	}
156 156
 
157 157
 	/**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function setNavigateUrl($value)
162 162
 	{
163
-		$this->setViewState('NavigateUrl',$value,'');
163
+		$this->setViewState('NavigateUrl', $value, '');
164 164
 	}
165 165
 
166 166
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getDataNavigateUrlField()
170 170
 	{
171
-		return $this->getViewState('DataNavigateUrlField','');
171
+		return $this->getViewState('DataNavigateUrlField', '');
172 172
 	}
173 173
 
174 174
 	/**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function setDataNavigateUrlField($value)
178 178
 	{
179
-		$this->setViewState('DataNavigateUrlField',$value,'');
179
+		$this->setViewState('DataNavigateUrlField', $value, '');
180 180
 	}
181 181
 
182 182
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function getDataNavigateUrlFormatString()
186 186
 	{
187
-		return $this->getViewState('DataNavigateUrlFormatString','');
187
+		return $this->getViewState('DataNavigateUrlFormatString', '');
188 188
 	}
189 189
 
190 190
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 */
193 193
 	public function setDataNavigateUrlFormatString($value)
194 194
 	{
195
-		$this->setViewState('DataNavigateUrlFormatString',$value,'');
195
+		$this->setViewState('DataNavigateUrlFormatString', $value, '');
196 196
 	}
197 197
 
198 198
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function getTarget()
202 202
 	{
203
-		return $this->getViewState('Target','');
203
+		return $this->getViewState('Target', '');
204 204
 	}
205 205
 
206 206
 	/**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function setTarget($value)
211 211
 	{
212
-		$this->setViewState('Target',$value,'');
212
+		$this->setViewState('Target', $value, '');
213 213
 	}
214 214
 
215 215
 	/**
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
 	 * @param integer the index to the Columns property that the cell resides in.
221 221
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
222 222
 	 */
223
-	public function initializeCell($cell,$columnIndex,$itemType)
223
+	public function initializeCell($cell, $columnIndex, $itemType)
224 224
 	{
225 225
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
226 226
 		{
227 227
 			$link=new THyperLink;
228
-			if(($url = $this->getImageUrl())!=='')
228
+			if(($url=$this->getImageUrl())!=='')
229 229
 			{
230 230
 				$link->setImageUrl($url);
231 231
 				if(($width=$this->getImageWidth())!=='')
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
 			$link->setNavigateUrl($this->getNavigateUrl());
238 238
 			$link->setTarget($this->getTarget());
239 239
 			if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='')
240
-				$link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
240
+				$link->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
241 241
 			$cell->getControls()->add($link);
242
-			$cell->registerObject('HyperLink',$link);
242
+			$cell->registerObject('HyperLink', $link);
243 243
 		}
244 244
 		else
245
-			parent::initializeCell($cell,$columnIndex,$itemType);
245
+			parent::initializeCell($cell, $columnIndex, $itemType);
246 246
 	}
247 247
 
248 248
 	/**
@@ -250,20 +250,20 @@  discard block
 block discarded – undo
250 250
 	 * This method is invoked when datagrid performs databinding.
251 251
 	 * It populates the content of the cell with the relevant data from data source.
252 252
 	 */
253
-	public function dataBindColumn($sender,$param)
253
+	public function dataBindColumn($sender, $param)
254 254
 	{
255 255
 		$item=$sender->getNamingContainer();
256 256
 		$data=$item->getData();
257 257
 		if(($field=$this->getDataTextField())!=='')
258 258
 		{
259
-			$value=$this->getDataFieldValue($data,$field);
260
-			$text=$this->formatDataValue($this->getDataTextFormatString(),$value);
259
+			$value=$this->getDataFieldValue($data, $field);
260
+			$text=$this->formatDataValue($this->getDataTextFormatString(), $value);
261 261
 			$sender->setText($text);
262 262
 		}
263 263
 		if(($field=$this->getDataNavigateUrlField())!=='')
264 264
 		{
265
-			$value=$this->getDataFieldValue($data,$field);
266
-			$url=$this->formatDataValue($this->getDataNavigateUrlFormatString(),$value);
265
+			$value=$this->getDataFieldValue($data, $field);
266
+			$url=$this->formatDataValue($this->getDataNavigateUrlFormatString(), $value);
267 267
 			$sender->setNavigateUrl($url);
268 268
 		}
269 269
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TFont.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 	protected function __getZappableSleepProps(&$exprops)
63 63
 	{
64 64
 		parent::__getZappableSleepProps($exprops);
65
-		if ($this->_flags===0)
66
-			$exprops[] = "\0TFont\0_flags";
67
-		if ($this->_name==='')
68
-			$exprops[] = "\0TFont\0_name";
69
-		if ($this->_size==='')
70
-			$exprops[] = "\0TFont\0_size";
65
+		if($this->_flags===0)
66
+			$exprops[]="\0TFont\0_flags";
67
+		if($this->_name==='')
68
+			$exprops[]="\0TFont\0_name";
69
+		if($this->_size==='')
70
+			$exprops[]="\0TFont\0_size";
71 71
 	}
72 72
 
73 73
 	/**
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function setBold($value)
85 85
 	{
86
-		$this->_flags |= self::IS_SET_BOLD;
86
+		$this->_flags|=self::IS_SET_BOLD;
87 87
 		if(TPropertyValue::ensureBoolean($value))
88
-			$this->_flags |= self::IS_BOLD;
88
+			$this->_flags|=self::IS_BOLD;
89 89
 		else
90
-			$this->_flags &= ~self::IS_BOLD;
90
+			$this->_flags&=~self::IS_BOLD;
91 91
 	}
92 92
 
93 93
 	/**
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function setItalic($value)
105 105
 	{
106
-		$this->_flags |= self::IS_SET_ITALIC;
106
+		$this->_flags|=self::IS_SET_ITALIC;
107 107
 		if(TPropertyValue::ensureBoolean($value))
108
-			$this->_flags |= self::IS_ITALIC;
108
+			$this->_flags|=self::IS_ITALIC;
109 109
 		else
110
-			$this->_flags &= ~self::IS_ITALIC;
110
+			$this->_flags&=~self::IS_ITALIC;
111 111
 	}
112 112
 
113 113
 	/**
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function setOverline($value)
125 125
 	{
126
-		$this->_flags |= self::IS_SET_OVERLINE;
126
+		$this->_flags|=self::IS_SET_OVERLINE;
127 127
 		if(TPropertyValue::ensureBoolean($value))
128
-			$this->_flags |= self::IS_OVERLINE;
128
+			$this->_flags|=self::IS_OVERLINE;
129 129
 		else
130
-			$this->_flags &= ~self::IS_OVERLINE;
130
+			$this->_flags&=~self::IS_OVERLINE;
131 131
 	}
132 132
 
133 133
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setSize($value)
145 145
 	{
146
-		$this->_flags |= self::IS_SET_SIZE;
146
+		$this->_flags|=self::IS_SET_SIZE;
147 147
 		$this->_size=$value;
148 148
 	}
149 149
 
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function setStrikeout($value)
162 162
 	{
163
-		$this->_flags |= self::IS_SET_STRIKEOUT;
163
+		$this->_flags|=self::IS_SET_STRIKEOUT;
164 164
 		if(TPropertyValue::ensureBoolean($value))
165
-			$this->_flags |= self::IS_STRIKEOUT;
165
+			$this->_flags|=self::IS_STRIKEOUT;
166 166
 		else
167
-			$this->_flags &= ~self::IS_STRIKEOUT;
167
+			$this->_flags&=~self::IS_STRIKEOUT;
168 168
 	}
169 169
 
170 170
 	/**
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function setUnderline($value)
182 182
 	{
183
-		$this->_flags |= self::IS_SET_UNDERLINE;
183
+		$this->_flags|=self::IS_SET_UNDERLINE;
184 184
 		if(TPropertyValue::ensureBoolean($value))
185
-			$this->_flags |= self::IS_UNDERLINE;
185
+			$this->_flags|=self::IS_UNDERLINE;
186 186
 		else
187
-			$this->_flags &= ~self::IS_UNDERLINE;
187
+			$this->_flags&=~self::IS_UNDERLINE;
188 188
 	}
189 189
 
190 190
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function setName($value)
202 202
 	{
203
-		$this->_flags |= self::IS_SET_NAME;
203
+		$this->_flags|=self::IS_SET_NAME;
204 204
 		$this->_name=$value;
205 205
 	}
206 206
 
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
 			return '';
284 284
 		$str='';
285 285
 		if($this->_flags & self::IS_SET_BOLD)
286
-			$str.='font-weight:'.(($this->_flags & self::IS_BOLD)?'bold;':'normal;');
286
+			$str.='font-weight:'.(($this->_flags & self::IS_BOLD) ? 'bold;' : 'normal;');
287 287
 		if($this->_flags & self::IS_SET_ITALIC)
288
-			$str.='font-style:'.(($this->_flags & self::IS_ITALIC)?'italic;':'normal;');
288
+			$str.='font-style:'.(($this->_flags & self::IS_ITALIC) ? 'italic;' : 'normal;');
289 289
 		$textDec='';
290 290
 		if($this->_flags & self::IS_UNDERLINE)
291 291
 			$textDec.='underline';
@@ -312,9 +312,9 @@  discard block
 block discarded – undo
312 312
 		if($this->_flags===0)
313 313
 			return;
314 314
 		if($this->_flags & self::IS_SET_BOLD)
315
-			$writer->addStyleAttribute('font-weight',(($this->_flags & self::IS_BOLD)?'bold':'normal'));
315
+			$writer->addStyleAttribute('font-weight', (($this->_flags & self::IS_BOLD) ? 'bold' : 'normal'));
316 316
 		if($this->_flags & self::IS_SET_ITALIC)
317
-			$writer->addStyleAttribute('font-style',(($this->_flags & self::IS_ITALIC)?'italic':'normal'));
317
+			$writer->addStyleAttribute('font-style', (($this->_flags & self::IS_ITALIC) ? 'italic' : 'normal'));
318 318
 		$textDec='';
319 319
 		if($this->_flags & self::IS_UNDERLINE)
320 320
 			$textDec.='underline';
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
 			$textDec.=' line-through';
325 325
 		$textDec=ltrim($textDec);
326 326
 		if($textDec!=='')
327
-			$writer->addStyleAttribute('text-decoration',$textDec);
327
+			$writer->addStyleAttribute('text-decoration', $textDec);
328 328
 		if($this->_size!=='')
329
-			$writer->addStyleAttribute('font-size',$this->_size);
329
+			$writer->addStyleAttribute('font-size', $this->_size);
330 330
 		if($this->_name!=='')
331
-			$writer->addStyleAttribute('font-family',$this->_name);
331
+			$writer->addStyleAttribute('font-family', $this->_name);
332 332
 	}
333 333
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TConditional.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@
 block discarded – undo
76 76
 		}
77 77
 		catch(Exception $e)
78 78
 		{
79
-			throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage());
79
+			throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage());
80 80
 		}
81 81
 		if($result)
82 82
 		{
83 83
 			if($this->_trueTemplate)
84
-				$this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this);
84
+				$this->_trueTemplate->instantiateIn($this->getTemplateControl(), $this);
85 85
 		}
86 86
 		else if($this->_falseTemplate)
87
-			$this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this);
87
+			$this->_falseTemplate->instantiateIn($this->getTemplateControl(), $this);
88 88
 		$this->_creatingChildren=false;
89 89
 	}
90 90
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THiddenField.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,18 +53,18 @@  discard block
 block discarded – undo
53 53
 	{
54 54
 		$uniqueID=$this->getUniqueID();
55 55
 		$this->getPage()->ensureRenderInForm($this);
56
-		$writer->addAttribute('type','hidden');
56
+		$writer->addAttribute('type', 'hidden');
57 57
 		if($uniqueID!=='')
58
-			$writer->addAttribute('name',$uniqueID);
58
+			$writer->addAttribute('name', $uniqueID);
59 59
 		if($this->getID()!=='')
60
-			$writer->addAttribute('id',$this->getClientID());
60
+			$writer->addAttribute('id', $this->getClientID());
61 61
 		if(($value=$this->getValue())!=='')
62
-			$writer->addAttribute('value',$value);
62
+			$writer->addAttribute('value', $value);
63 63
 
64 64
 		if($this->getHasAttributes())
65 65
 		{
66 66
 			foreach($this->getAttributes() as $name=>$value)
67
-				$writer->addAttribute($name,$value);
67
+				$writer->addAttribute($name, $value);
68 68
 		}
69 69
 
70 70
 		$writer->renderBeginTag('input');
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @param array the input data collection
79 79
 	 * @return boolean whether the data of the component has been changed
80 80
 	 */
81
-	public function loadPostData($key,$values)
81
+	public function loadPostData($key, $values)
82 82
 	{
83 83
 		$value=$values[$key];
84 84
 		if($value===$this->getValue())
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function onValueChanged($param)
148 148
 	{
149
-		$this->raiseEvent('OnValueChanged',$this,$param);
149
+		$this->raiseEvent('OnValueChanged', $this, $param);
150 150
 	}
151 151
 
152 152
 	/**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function getValue()
156 156
 	{
157
-		return $this->getViewState('Value','');
157
+		return $this->getViewState('Value', '');
158 158
 	}
159 159
 
160 160
 	/**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	public function setValue($value)
165 165
 	{
166
-		$this->setViewState('Value',$value,'');
166
+		$this->setViewState('Value', $value, '');
167 167
 	}
168 168
 
169 169
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THtmlElement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public function getTagName()
39 39
 	{
40
-		return ($this->_tagName !== null) ? $this->_tagName : ($this->_tagName = $this->getDefaultTagName());
40
+		return ($this->_tagName!==null) ? $this->_tagName : ($this->_tagName=$this->getDefaultTagName());
41 41
 	}
42 42
 
43 43
 	/**
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
 	 * @return boolean true if TagName has deviated from the default.
62 62
 	 */
63 63
 	public function getIsMutated() {
64
-		return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName();
64
+		return $this->_tagName!==null && $this->_tagName!=$this->getDefaultTagName();
65 65
 	}
66 66
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/assets/captcha.php 1 patch
Spacing   +98 added lines, -99 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
  * @package System.Web.UI.WebControls.assets
10 10
  */
11 11
 
12
-define('THEME_OPAQUE_BACKGROUND',0x0001);
13
-define('THEME_NOISY_BACKGROUND',0x0002);
14
-define('THEME_HAS_GRID',0x0004);
15
-define('THEME_HAS_SCRIBBLE',0x0008);
16
-define('THEME_MORPH_BACKGROUND',0x0010);
17
-define('THEME_SHADOWED_TEXT',0x0020);
12
+define('THEME_OPAQUE_BACKGROUND', 0x0001);
13
+define('THEME_NOISY_BACKGROUND', 0x0002);
14
+define('THEME_HAS_GRID', 0x0004);
15
+define('THEME_HAS_SCRIBBLE', 0x0008);
16
+define('THEME_MORPH_BACKGROUND', 0x0010);
17
+define('THEME_SHADOWED_TEXT', 0x0020);
18 18
 
19 19
 require_once(dirname(__FILE__).'/captcha_key.php');
20 20
 
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 if(isset($_GET['options']))
25 25
 {
26 26
 	$str=base64_decode($_GET['options']);
27
-	if(strlen($str)>32)
27
+	if(strlen($str) > 32)
28 28
 	{
29
-		$hash=substr($str,0,32);
30
-		$str=substr($str,32);
29
+		$hash=substr($str, 0, 32);
30
+		$str=substr($str, 32);
31 31
 		if(md5($privateKey.$str)===$hash)
32 32
 		{
33 33
 			$options=unserialize($str);
@@ -37,83 +37,82 @@  discard block
 block discarded – undo
37 37
 			$alphabet=$options['alphabet'];
38 38
 			$fontSize=$options['fontSize'];
39 39
 			$theme=$options['theme'];
40
-			if(($randomSeed=$options['randomSeed'])>0)
40
+			if(($randomSeed=$options['randomSeed']) > 0)
41 41
 				srand($randomSeed);
42 42
 			else
43
-				srand((int)(microtime()*1000000));
44
-			$token=generateToken($publicKey,$privateKey,$alphabet,$tokenLength,$caseSensitive);
43
+				srand((int) (microtime() * 1000000));
44
+			$token=generateToken($publicKey, $privateKey, $alphabet, $tokenLength, $caseSensitive);
45 45
 		}
46 46
 	}
47 47
 }
48 48
 
49
-displayToken($token,$fontSize,$theme);
49
+displayToken($token, $fontSize, $theme);
50 50
 
51
-function generateToken($publicKey,$privateKey,$alphabet,$tokenLength,$caseSensitive)
51
+function generateToken($publicKey, $privateKey, $alphabet, $tokenLength, $caseSensitive)
52 52
 {
53
-	$token=substr(hash2string(md5($publicKey.$privateKey),$alphabet).hash2string(md5($privateKey.$publicKey),$alphabet),0,$tokenLength);
54
-	return $caseSensitive?$token:strtoupper($token);
53
+	$token=substr(hash2string(md5($publicKey.$privateKey), $alphabet).hash2string(md5($privateKey.$publicKey), $alphabet), 0, $tokenLength);
54
+	return $caseSensitive ? $token : strtoupper($token);
55 55
 }
56 56
 
57
-function hash2string($hex,$alphabet)
57
+function hash2string($hex, $alphabet)
58 58
 {
59
-	if(strlen($alphabet)<2)
59
+	if(strlen($alphabet) < 2)
60 60
 		$alphabet='234578adefhijmnrtABDEFGHJLMNRT';
61 61
 	$hexLength=strlen($hex);
62 62
 	$base=strlen($alphabet);
63 63
 	$result='';
64
-	for($i=0;$i<$hexLength;$i+=6)
64
+	for($i=0; $i < $hexLength; $i+=6)
65 65
 	{
66
-		$number=hexdec(substr($hex,$i,6));
66
+		$number=hexdec(substr($hex, $i, 6));
67 67
 		while($number)
68 68
 		{
69
-			$result.=$alphabet[$number%$base];
70
-			$number=floor($number/$base);
69
+			$result.=$alphabet[$number % $base];
70
+			$number=floor($number / $base);
71 71
 		}
72 72
 	}
73 73
 	return $result;
74 74
 }
75 75
 
76
-function displayToken($token,$fontSize,$theme)
76
+function displayToken($token, $fontSize, $theme)
77 77
 {
78
-	if(($fontSize=(int)$fontSize)<22)
78
+	if(($fontSize=(int) $fontSize) < 22)
79 79
 		$fontSize=22;
80
-	if($fontSize>100)
80
+	if($fontSize > 100)
81 81
 		$fontSize=100;
82 82
 	$length=strlen($token);
83 83
 	$padding=10;
84 84
 	$fontWidth=$fontSize;
85
-	$fontHeight=floor($fontWidth*1.5);
86
-	$width=$fontWidth*$length+$padding*2;
85
+	$fontHeight=floor($fontWidth * 1.5);
86
+	$width=$fontWidth * $length + $padding * 2;
87 87
 	$height=$fontHeight;
88
-	$image=imagecreatetruecolor($width,$height);
88
+	$image=imagecreatetruecolor($width, $height);
89 89
 
90
-	addBackground
91
-	(
90
+	addBackground(
92 91
 		$image, $width, $height,
93
-		$theme&THEME_OPAQUE_BACKGROUND,
94
-		$theme&THEME_NOISY_BACKGROUND,
95
-		$theme&THEME_HAS_GRID,
96
-		$theme&THEME_HAS_SCRIBBLE,
97
-		$theme&THEME_MORPH_BACKGROUND
92
+		$theme & THEME_OPAQUE_BACKGROUND,
93
+		$theme & THEME_NOISY_BACKGROUND,
94
+		$theme & THEME_HAS_GRID,
95
+		$theme & THEME_HAS_SCRIBBLE,
96
+		$theme & THEME_MORPH_BACKGROUND
98 97
 	);
99 98
 
100 99
 	$font=dirname(__FILE__).DIRECTORY_SEPARATOR.'verase.ttf';
101 100
 
102 101
 	if(function_exists('imagefilter'))
103
-    	imagefilter($image,IMG_FILTER_GAUSSIAN_BLUR);
102
+    	imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR);
104 103
 
105
-	$hasShadow=($theme&THEME_SHADOWED_TEXT);
106
-    for($i=0;$i<$length;$i++)
104
+	$hasShadow=($theme & THEME_SHADOWED_TEXT);
105
+    for($i=0; $i < $length; $i++)
107 106
 	{
108
-        $color=imagecolorallocate($image,rand(150,220),rand(150,220),rand(150,220));
109
-        $size=rand($fontWidth-10,$fontWidth);
110
-        $angle=rand(-30,30);
111
-        $x=$padding+$i*$fontWidth;
112
-        $y=rand($fontHeight-15,$fontHeight-10);
113
-        imagettftext($image,$size,$angle,$x,$y,$color,$font,$token[$i]);
107
+        $color=imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220));
108
+        $size=rand($fontWidth - 10, $fontWidth);
109
+        $angle=rand(-30, 30);
110
+        $x=$padding + $i * $fontWidth;
111
+        $y=rand($fontHeight - 15, $fontHeight - 10);
112
+        imagettftext($image, $size, $angle, $x, $y, $color, $font, $token[$i]);
114 113
         if($hasShadow)
115
-        	imagettftext($image,$size,$angle,$x+2,$y+2,$color,$font,$token[$i]);
116
-        imagecolordeallocate($image,$color);
114
+        	imagettftext($image, $size, $angle, $x + 2, $y + 2, $color, $font, $token[$i]);
115
+        imagecolordeallocate($image, $color);
117 116
     }
118 117
 
119 118
 	header('Content-Type: image/png');
@@ -121,103 +120,103 @@  discard block
 block discarded – undo
121 120
 	imagedestroy($image);
122 121
 }
123 122
 
124
-function addBackground($image,$width,$height,$opaque,$noisy,$hasGrid,$hasScribble,$morph)
123
+function addBackground($image, $width, $height, $opaque, $noisy, $hasGrid, $hasScribble, $morph)
125 124
 {
126
-	$background=imagecreatetruecolor($width*2,$height*2);
127
-	$white=imagecolorallocate($background,255,255,255);
128
-	imagefill($background,0,0,$white);
125
+	$background=imagecreatetruecolor($width * 2, $height * 2);
126
+	$white=imagecolorallocate($background, 255, 255, 255);
127
+	imagefill($background, 0, 0, $white);
129 128
 
130 129
 	if($opaque)
131
-		imagefill($background,0,0,imagecolorallocate($background,100,100,100));
130
+		imagefill($background, 0, 0, imagecolorallocate($background, 100, 100, 100));
132 131
 
133 132
 	if($noisy)
134
-		addNoise($background,$width*2,$height*2);
133
+		addNoise($background, $width * 2, $height * 2);
135 134
 
136 135
 	if($hasGrid)
137
-		addGrid($background,$width*2,$height*2);
136
+		addGrid($background, $width * 2, $height * 2);
138 137
 
139 138
 	if($hasScribble)
140
-		addScribble($background,$width*2,$height*2);
139
+		addScribble($background, $width * 2, $height * 2);
141 140
 
142 141
 	if($morph)
143
-		morphImage($background,$width*2,$height*2);
142
+		morphImage($background, $width * 2, $height * 2);
144 143
 
145
-	imagecopy($image,$background,0,0,30,30,$width,$height);
144
+	imagecopy($image, $background, 0, 0, 30, 30, $width, $height);
146 145
 
147 146
 	if(!$opaque)
148
-		imagecolortransparent($image,$white);
147
+		imagecolortransparent($image, $white);
149 148
 }
150 149
 
151
-function addNoise($image,$width,$height)
150
+function addNoise($image, $width, $height)
152 151
 {
153
-	for($x=0;$x<$width;++$x)
152
+	for($x=0; $x < $width; ++$x)
154 153
 	{
155
-		for($y=0;$y<$height;++$y)
154
+		for($y=0; $y < $height; ++$y)
156 155
 		{
157
-			if(rand(0,100)<25)
156
+			if(rand(0, 100) < 25)
158 157
 			{
159
-				$color=imagecolorallocate($image,rand(150,220),rand(150,220),rand(150,220));
160
-				imagesetpixel($image,$x,$y,$color);
161
-	            imagecolordeallocate($image,$color);
158
+				$color=imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220));
159
+				imagesetpixel($image, $x, $y, $color);
160
+	            imagecolordeallocate($image, $color);
162 161
 	        }
163 162
 		}
164 163
 	}
165 164
 }
166 165
 
167
-function addGrid($image,$width,$height)
166
+function addGrid($image, $width, $height)
168 167
 {
169
-	for($i=0;$i<$width;$i+=rand(15,25))
168
+	for($i=0; $i < $width; $i+=rand(15, 25))
170 169
 	{
171
-		imagesetthickness($image,rand(2,6));
172
-		$color=imagecolorallocate($image,rand(100,180),rand(100,180),rand(100,180));
173
-		imageline($image,$i+rand(-10,20),0,$i+rand(-10,20),$height,$color);
174
-		imagecolordeallocate($image,$color);
170
+		imagesetthickness($image, rand(2, 6));
171
+		$color=imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180));
172
+		imageline($image, $i + rand(-10, 20), 0, $i + rand(-10, 20), $height, $color);
173
+		imagecolordeallocate($image, $color);
175 174
 	}
176
-	for($i=0;$i<$height;$i+=rand(15,25))
175
+	for($i=0; $i < $height; $i+=rand(15, 25))
177 176
 	{
178
-		imagesetthickness($image,rand(2,6));
179
-		$color=imagecolorallocate($image,rand(100,180),rand(100,180),rand(100,180));
180
-		imageline($image,0,$i+rand(-10,20),$width,$i+rand(-10,20),$color);
181
-		imagecolordeallocate($image,$color);
177
+		imagesetthickness($image, rand(2, 6));
178
+		$color=imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180));
179
+		imageline($image, 0, $i + rand(-10, 20), $width, $i + rand(-10, 20), $color);
180
+		imagecolordeallocate($image, $color);
182 181
 	}
183 182
 }
184 183
 
185
-function addScribble($image,$width,$height)
184
+function addScribble($image, $width, $height)
186 185
 {
187
-	for($i=0;$i<8;$i++)
186
+	for($i=0; $i < 8; $i++)
188 187
 	{
189
-		$color=imagecolorallocate($image,rand(100,180),rand(100,180),rand(100,180));
188
+		$color=imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180));
190 189
 		$points=array();
191
-		for($j=1;$j<rand(5,10);$j++)
190
+		for($j=1; $j < rand(5, 10); $j++)
192 191
 		{
193
-			$points[]=rand(2*(20*($i+1)),2*(50*($i+1)));
194
-			$points[]=rand(30,$height+30);
192
+			$points[]=rand(2 * (20 * ($i + 1)), 2 * (50 * ($i + 1)));
193
+			$points[]=rand(30, $height + 30);
195 194
 		}
196
-		imagesetthickness($image,rand(2,6));
197
-		imagepolygon($image,$points,intval(sizeof($points)/2),$color);
198
-		imagecolordeallocate($image,$color);
195
+		imagesetthickness($image, rand(2, 6));
196
+		imagepolygon($image, $points, intval(sizeof($points) / 2), $color);
197
+		imagecolordeallocate($image, $color);
199 198
 	}
200 199
 }
201 200
 
202
-function morphImage($image,$width,$height)
201
+function morphImage($image, $width, $height)
203 202
 {
204
-	$tempImage=imagecreatetruecolor($width,$height);
205
-	$chunk=rand(1,5);
206
-	for($x=$y=0;$x<$width;$x+=$chunk)
203
+	$tempImage=imagecreatetruecolor($width, $height);
204
+	$chunk=rand(1, 5);
205
+	for($x=$y=0; $x < $width; $x+=$chunk)
207 206
 	{
208
-		$chunk=rand(1,5);
209
-		$y+=rand(-1,1);
210
-		if($y>=$height)	$y=$height-5;
211
-		if($y<0) $y=5;
212
-		imagecopy($tempImage,$image,$x,0,$x,$y,$chunk,$height);
207
+		$chunk=rand(1, 5);
208
+		$y+=rand(-1, 1);
209
+		if($y >= $height)	$y=$height - 5;
210
+		if($y < 0) $y=5;
211
+		imagecopy($tempImage, $image, $x, 0, $x, $y, $chunk, $height);
213 212
 	}
214
-	for($x=$y=0;$y<$height;$y+=$chunk)
213
+	for($x=$y=0; $y < $height; $y+=$chunk)
215 214
 	{
216
-		$chunk=rand(1,5);
217
-		$x+=rand(-1,1);
218
-		if($x>=$width)	$x=$width-5;
219
-		if($x<0) $x=5;
220
-		imagecopy($image,$tempImage,$x,$y,0,$y,$width,$chunk);
215
+		$chunk=rand(1, 5);
216
+		$x+=rand(-1, 1);
217
+		if($x >= $width)	$x=$width - 5;
218
+		if($x < 0) $x=5;
219
+		imagecopy($image, $tempImage, $x, $y, 0, $y, $width, $chunk);
221 220
 	}
222 221
 }
223 222
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBoundColumn.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function getItemRenderer()
54 54
 	{
55
-		return $this->getViewState('ItemRenderer','');
55
+		return $this->getViewState('ItemRenderer', '');
56 56
 	}
57 57
 
58 58
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function setItemRenderer($value)
73 73
 	{
74
-		$this->setViewState('ItemRenderer',$value,'');
74
+		$this->setViewState('ItemRenderer', $value, '');
75 75
 	}
76 76
 
77 77
 	/**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function getEditItemRenderer()
82 82
 	{
83
-		return $this->getViewState('EditItemRenderer','');
83
+		return $this->getViewState('EditItemRenderer', '');
84 84
 	}
85 85
 
86 86
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function setEditItemRenderer($value)
101 101
 	{
102
-		$this->setViewState('EditItemRenderer',$value,'');
102
+		$this->setViewState('EditItemRenderer', $value, '');
103 103
 	}
104 104
 
105 105
 	/**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 */
108 108
 	public function getDataField()
109 109
 	{
110
-		return $this->getViewState('DataField','');
110
+		return $this->getViewState('DataField', '');
111 111
 	}
112 112
 
113 113
 	/**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function setDataField($value)
117 117
 	{
118
-		$this->setViewState('DataField',$value,'');
118
+		$this->setViewState('DataField', $value, '');
119 119
 	}
120 120
 
121 121
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function getDataFormatString()
125 125
 	{
126
-		return $this->getViewState('DataFormatString','');
126
+		return $this->getViewState('DataFormatString', '');
127 127
 	}
128 128
 
129 129
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function setDataFormatString($value)
133 133
 	{
134
-		$this->setViewState('DataFormatString',$value,'');
134
+		$this->setViewState('DataFormatString', $value, '');
135 135
 	}
136 136
 
137 137
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function getReadOnly()
141 141
 	{
142
-		return $this->getViewState('ReadOnly',false);
142
+		return $this->getViewState('ReadOnly', false);
143 143
 	}
144 144
 
145 145
 	/**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function setReadOnly($value)
149 149
 	{
150
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
150
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
151 151
 	}
152 152
 
153 153
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 * @param integer the index to the Columns property that the cell resides in.
162 162
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
163 163
 	 */
164
-	public function initializeCell($cell,$columnIndex,$itemType)
164
+	public function initializeCell($cell, $columnIndex, $itemType)
165 165
 	{
166 166
 		$item=$cell->getParent();
167 167
 		switch($itemType)
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 				}
182 182
 				else
183 183
 					$control=$cell;
184
-				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
184
+				$control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
185 185
 				break;
186 186
 			case TListItemType::EditItem:
187 187
 				if(!$this->getReadOnly())
@@ -195,13 +195,13 @@  discard block
 block discarded – undo
195 195
 							$control->setItemType($item->getItemType());
196 196
 						}
197 197
 						$cell->getControls()->add($control);
198
-						$cell->registerObject('EditControl',$control);
198
+						$cell->registerObject('EditControl', $control);
199 199
 					}
200 200
 					else
201 201
 					{
202 202
 						$control=Prado::createComponent('System.Web.UI.WebControls.TTextBox');
203 203
 						$cell->getControls()->add($control);
204
-						$cell->registerObject('TextBox',$control);
204
+						$cell->registerObject('TextBox', $control);
205 205
 					}
206 206
 				}
207 207
 				else
@@ -219,10 +219,10 @@  discard block
 block discarded – undo
219 219
 					else
220 220
 						$control=$cell;
221 221
 				}
222
-				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
222
+				$control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
223 223
 				break;
224 224
 			default:
225
-				parent::initializeCell($cell,$columnIndex,$itemType);
225
+				parent::initializeCell($cell, $columnIndex, $itemType);
226 226
 				break;
227 227
 		}
228 228
 	}
@@ -232,15 +232,15 @@  discard block
 block discarded – undo
232 232
 	 * This method is invoked when datagrid performs databinding.
233 233
 	 * It populates the content of the cell with the relevant data from data source.
234 234
 	 */
235
-	public function dataBindColumn($sender,$param)
235
+	public function dataBindColumn($sender, $param)
236 236
 	{
237 237
 		$item=$sender->getNamingContainer();
238 238
 		$data=$item->getData();
239 239
 		$formatString=$this->getDataFormatString();
240 240
 		if(($field=$this->getDataField())!=='')
241
-			$value=$this->formatDataValue($formatString,$this->getDataFieldValue($data,$field));
241
+			$value=$this->formatDataValue($formatString, $this->getDataFieldValue($data, $field));
242 242
 		else
243
-			$value=$this->formatDataValue($formatString,$data);
243
+			$value=$this->formatDataValue($formatString, $data);
244 244
 		$sender->setData($value);
245 245
 	}
246 246
 }
Please login to merge, or discard this patch.