Completed
Push — namespace2 ( 791eac...5c23fb )
by Fabio
08:41
created
framework/Web/UI/WebControls/TInlineFrame.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	public function setWidth($value)
160 160
 	{
161 161
 	  if(($value=TPropertyValue::ensureInteger($value))<0)
162
-	    $value=-1;
162
+		$value=-1;
163 163
 	  $this->setViewState('Width',$value,-1);
164 164
 	}
165 165
 	
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	public function setHeight($value)
178 178
 	{
179 179
 	  if(($value=TPropertyValue::ensureInteger($value))<0)
180
-	    $value=-1;
180
+		$value=-1;
181 181
 	  $this->setViewState('Height',$value,-1);
182 182
 	}
183 183
 	
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public function getAlign()
49 49
 	{
50
-		return $this->getViewState('Align',TInlineFrameAlign::NotSet);
50
+		return $this->getViewState('Align', TInlineFrameAlign::NotSet);
51 51
 	}
52 52
 
53 53
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function setAlign($value)
57 57
 	{
58
-		$this->setViewState('Align',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TInlineFrameAlign'),TInlineFrameAlign::NotSet);
58
+		$this->setViewState('Align', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TInlineFrameAlign'), TInlineFrameAlign::NotSet);
59 59
 	}
60 60
 
61 61
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function getDescriptionUrl()
65 65
 	{
66
-		return $this->getViewState('DescriptionUrl','');
66
+		return $this->getViewState('DescriptionUrl', '');
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function setDescriptionUrl($value)
73 73
 	{
74
-		$this->setViewState('DescriptionUrl',$value,'');
74
+		$this->setViewState('DescriptionUrl', $value, '');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function getShowBorder()
81 81
 	{
82
-		return $this->getViewState('ShowBorder',true);
82
+		return $this->getViewState('ShowBorder', true);
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function setShowBorder($value)
89 89
 	{
90
-		$this->setViewState('ShowBorder',TPropertyValue::ensureBoolean($value),true);
90
+		$this->setViewState('ShowBorder', TPropertyValue::ensureBoolean($value), true);
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function getFrameUrl()
97 97
 	{
98
-		return $this->getViewState('FrameUrl','');
98
+		return $this->getViewState('FrameUrl', '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function setFrameUrl($value)
105 105
 	{
106
-		$this->setViewState('FrameUrl',$value,'');
106
+		$this->setViewState('FrameUrl', $value, '');
107 107
 	}
108 108
 
109 109
 	/**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 */
138 138
 	public function getScrollBars()
139 139
 	{
140
-		return $this->getViewState('ScrollBars',TInlineFrameScrollBars::Auto);
140
+		return $this->getViewState('ScrollBars', TInlineFrameScrollBars::Auto);
141 141
 	}
142 142
 
143 143
 	/**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 */
146 146
 	public function setScrollBars($value)
147 147
 	{
148
-		$this->setViewState('ScrollBars',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TInlineFrameScrollBars'),TInlineFrameScrollBars::Auto);
148
+		$this->setViewState('ScrollBars', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TInlineFrameScrollBars'), TInlineFrameScrollBars::Auto);
149 149
 	}
150 150
 
151 151
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 */
154 154
 	public function getWidth()
155 155
 	{
156
-	  return $this->getViewState('Width',-1);
156
+	  return $this->getViewState('Width', -1);
157 157
 	}
158 158
 	
159 159
 	/**
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	public function setWidth($value)
163 163
 	{
164
-	  if(($value=TPropertyValue::ensureInteger($value))<0)
164
+	  if(($value=TPropertyValue::ensureInteger($value)) < 0)
165 165
 	    $value=-1;
166
-	  $this->setViewState('Width',$value,-1);
166
+	  $this->setViewState('Width', $value, -1);
167 167
 	}
168 168
 	
169 169
 	/**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public function getHeight()
173 173
 	{
174
-	  return $this->getViewState('Height',-1);
174
+	  return $this->getViewState('Height', -1);
175 175
 	}
176 176
 	
177 177
 	/**
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	public function setHeight($value)
181 181
 	{
182
-	  if(($value=TPropertyValue::ensureInteger($value))<0)
182
+	  if(($value=TPropertyValue::ensureInteger($value)) < 0)
183 183
 	    $value=-1;
184
-	  $this->setViewState('Height',$value,-1);
184
+	  $this->setViewState('Height', $value, -1);
185 185
 	}
186 186
 	
187 187
 	/**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	public function getMarginWidth()
192 192
 	{
193
-		return $this->getViewState('MarginWidth',-1);
193
+		return $this->getViewState('MarginWidth', -1);
194 194
 	}
195 195
 
196 196
 	/**
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
 	 */
200 200
 	public function setMarginWidth($value)
201 201
 	{
202
-		if(($value=TPropertyValue::ensureInteger($value))<0)
202
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
203 203
 			$value=-1;
204
-		$this->setViewState('MarginWidth',$value,-1);
204
+		$this->setViewState('MarginWidth', $value, -1);
205 205
 	}
206 206
 
207 207
 	/**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	 */
211 211
 	public function getMarginHeight()
212 212
 	{
213
-		return $this->getViewState('MarginHeight',-1);
213
+		return $this->getViewState('MarginHeight', -1);
214 214
 	}
215 215
 
216 216
 	/**
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
 	 */
220 220
 	public function setMarginHeight($value)
221 221
 	{
222
-		if(($value=TPropertyValue::ensureInteger($value))<0)
222
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
223 223
 			$value=-1;
224
-		$this->setViewState('MarginHeight',$value,-1);
224
+		$this->setViewState('MarginHeight', $value, -1);
225 225
 	}
226 226
 
227 227
 	/**
@@ -232,37 +232,37 @@  discard block
 block discarded – undo
232 232
 	protected function addAttributesToRender($writer)
233 233
 	{
234 234
 		if($this->getID()!=='')
235
-			$writer->addAttribute('name',$this->getUniqueID());
235
+			$writer->addAttribute('name', $this->getUniqueID());
236 236
 
237 237
 		if(($src=$this->getFrameUrl())!=='')
238
-			$writer->addAttribute('src',$src);
238
+			$writer->addAttribute('src', $src);
239 239
 
240 240
 		if(($align=strtolower($this->getAlign()))!=='notset')
241
-			$writer->addAttribute('align',$align);
241
+			$writer->addAttribute('align', $align);
242 242
 
243 243
 		$scrollBars=$this->getScrollBars();
244 244
 		if($scrollBars===TInlineFrameScrollBars::None)
245
-			$writer->addAttribute('scrolling','no');
245
+			$writer->addAttribute('scrolling', 'no');
246 246
 		else if($scrollBars===TInlineFrameScrollBars::Both)
247
-			$writer->addAttribute('scrolling','yes');
247
+			$writer->addAttribute('scrolling', 'yes');
248 248
 
249
-		if (!$this->getShowBorder())
250
-			$writer->addAttribute('frameborder','0');
249
+		if(!$this->getShowBorder())
250
+			$writer->addAttribute('frameborder', '0');
251 251
 
252 252
 		if(($longdesc=$this->getDescriptionUrl())!=='')
253
-			$writer->addAttribute('longdesc',$longdesc);
253
+			$writer->addAttribute('longdesc', $longdesc);
254 254
 		
255
-		if (($width=$this->getWidth())!==-1)
256
-		  $writer->addAttribute('width',$width);
255
+		if(($width=$this->getWidth())!==-1)
256
+		  $writer->addAttribute('width', $width);
257 257
 		
258
-		if (($height=$this->getHeight())!==-1)
259
-		  $writer->addAttribute('height',$height);
258
+		if(($height=$this->getHeight())!==-1)
259
+		  $writer->addAttribute('height', $height);
260 260
 
261 261
 		if(($marginheight=$this->getMarginHeight())!==-1)
262
-			$writer->addAttribute('marginheight',$marginheight);
262
+			$writer->addAttribute('marginheight', $marginheight);
263 263
 
264 264
 		if(($marginwidth=$this->getMarginWidth())!==-1)
265
-			$writer->addAttribute('marginwidth',$marginwidth);
265
+			$writer->addAttribute('marginwidth', $marginwidth);
266 266
 
267 267
 		parent::addAttributesToRender($writer);
268 268
 	}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -101,6 +101,7 @@
 block discarded – undo
101 101
 
102 102
 	/**
103 103
 	 * @param boolean whether this transaction is active
104
+	 * @param boolean $value
104 105
 	 */
105 106
 	protected function setActive($value)
106 107
 	{
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/assets/captcha.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -100,21 +100,21 @@  discard block
 block discarded – undo
100 100
 	$font=dirname(__FILE__).DIRECTORY_SEPARATOR.'verase.ttf';
101 101
 
102 102
 	if(function_exists('imagefilter'))
103
-    	imagefilter($image,IMG_FILTER_GAUSSIAN_BLUR);
103
+		imagefilter($image,IMG_FILTER_GAUSSIAN_BLUR);
104 104
 
105 105
 	$hasShadow=($theme&THEME_SHADOWED_TEXT);
106
-    for($i=0;$i<$length;$i++)
106
+	for($i=0;$i<$length;$i++)
107 107
 	{
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]);
114
-        if($hasShadow)
115
-        	imagettftext($image,$size,$angle,$x+2,$y+2,$color,$font,$token[$i]);
116
-        imagecolordeallocate($image,$color);
117
-    }
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]);
114
+		if($hasShadow)
115
+			imagettftext($image,$size,$angle,$x+2,$y+2,$color,$font,$token[$i]);
116
+		imagecolordeallocate($image,$color);
117
+	}
118 118
 
119 119
 	header('Content-Type: image/png');
120 120
 	imagepng($image);
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 			{
159 159
 				$color=imagecolorallocate($image,rand(150,220),rand(150,220),rand(150,220));
160 160
 				imagesetpixel($image,$x,$y,$color);
161
-	            imagecolordeallocate($image,$color);
162
-	        }
161
+				imagecolordeallocate($image,$color);
162
+			}
163 163
 		}
164 164
 	}
165 165
 }
Please login to merge, or discard this 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/TTableRow.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 	/**
91 91
 	 * Sets the horizontal alignment of the contents within the table item.
92
-     * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
92
+	 * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
93 93
 	 * @param string the horizontal alignment
94 94
 	 */
95 95
 	public function setHorizontalAlign($value)
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	/**
112 112
 	 * Sets the vertical alignment of the contents within the table item.
113
-     * Valid values include 'NotSet','Top','Bottom','Middle'
113
+	 * Valid values include 'NotSet','Top','Bottom','Middle'
114 114
 	 * @param string the horizontal alignment
115 115
 	 */
116 116
 	public function setVerticalAlign($value)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function getTableSection()
123 123
 	{
124
-		return $this->getViewState('TableSection',TTableRowSection::Body);
124
+		return $this->getViewState('TableSection', TTableRowSection::Body);
125 125
 	}
126 126
 
127 127
 	/**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function setTableSection($value)
131 131
 	{
132
-		$this->setViewState('TableSection',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TTableRowSection'),TTableRowSection::Body);
132
+		$this->setViewState('TableSection', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TTableRowSection'), TTableRowSection::Body);
133 133
 	}
134 134
 
135 135
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTabPanel.php 3 patches
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	/**
84
-     * Returns the index of the active tab view.
85
-     * Note, this property may not return the correct index.
86
-     * To ensure the correctness, call {@link getActiveView()} first.
84
+	 * Returns the index of the active tab view.
85
+	 * Note, this property may not return the correct index.
86
+	 * To ensure the correctness, call {@link getActiveView()} first.
87 87
 	 * @return integer the zero-based index of the active tab view. If -1, it means no active tab view. Default is 0 (the first view is active).
88 88
 	 */
89 89
 	public function getActiveViewIndex()
@@ -100,24 +100,24 @@  discard block
 block discarded – undo
100 100
 		$this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0);
101 101
 	}
102 102
 
103
-    /**
104
-     * Returns the ID of the active tab view.
105
-     * Note, this property may not return the correct ID.
106
-     * To ensure the correctness, call {@link getActiveView()} first.
107
-     * @return string The ID of the active tab view. Defaults to '', meaning not set.
108
-     */
109
-    public function getActiveViewID()
110
-    {
103
+	/**
104
+	 * Returns the ID of the active tab view.
105
+	 * Note, this property may not return the correct ID.
106
+	 * To ensure the correctness, call {@link getActiveView()} first.
107
+	 * @return string The ID of the active tab view. Defaults to '', meaning not set.
108
+	 */
109
+	public function getActiveViewID()
110
+	{
111 111
 		return $this->getViewState('ActiveViewID','');
112
-    }
112
+	}
113 113
 
114
-    /**
115
-     * @param string The ID of the active tab view.
116
-     */
117
-    public function setActiveViewID($value)
118
-    {
114
+	/**
115
+	 * @param string The ID of the active tab view.
116
+	 */
117
+	public function setActiveViewID($value)
118
+	{
119 119
 		$this->setViewState('ActiveViewID',$value,'');
120
-    }
120
+	}
121 121
 
122 122
 	/**
123 123
 	 * Returns the currently active view.
@@ -172,63 +172,63 @@  discard block
 block discarded – undo
172 172
 			throw new TInvalidOperationException('tabpanel_view_inexistent');
173 173
 	}
174 174
 
175
-    /**
176
-     * @return bool status of automatic tab switch on hover
177
-     */
178
-    public function getAutoSwitch()
179
-    {
180
-        return TPropertyValue::ensureBoolean($this->getViewState('AutoSwitch'));
181
-    }
182
-
183
-    /**
184
-     * @param bool whether to enable automatic tab switch on hover
185
-     */
186
-    public function setAutoSwitch($value)
187
-    {
188
-        $this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
189
-    }
190
-
191
-
192
-    /**
193
-     * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
194
-     */
195
-    public function getCssUrl()
196
-    {
197
-        return $this->getViewState('CssUrl','default');
198
-    }
199
-
200
-    /**
201
-     * @param string URL for the CSS file including all relevant CSS class definitions.
202
-     */
203
-    public function setCssUrl($value)
204
-    {
205
-        $this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
206
-    }
207
-
208
-    /**
209
-     * @return string CSS class for the whole tab control div. Defaults to 'tab-panel'.
210
-     */
211
-    public function getCssClass()
212
-    {
213
-    	$cssClass=parent::getCssClass();
214
-    	return $cssClass===''?'tab-panel':$cssClass;
215
-    }
216
-
217
-    /**
218
-     * @return string CSS class for the currently displayed view div. Defaults to 'tab-view'.
219
-     */
220
-    public function getViewCssClass()
221
-    {
222
-        return $this->getViewStyle()->getCssClass();
223
-    }
224
-
225
-    /**
226
-     * @param string CSS class for the currently displayed view div.
227
-     */
228
-    public function setViewCssClass($value)
229
-    {
230
-        $this->getViewStyle()->setCssClass($value);
231
-    }
175
+	/**
176
+	 * @return bool status of automatic tab switch on hover
177
+	 */
178
+	public function getAutoSwitch()
179
+	{
180
+		return TPropertyValue::ensureBoolean($this->getViewState('AutoSwitch'));
181
+	}
182
+
183
+	/**
184
+	 * @param bool whether to enable automatic tab switch on hover
185
+	 */
186
+	public function setAutoSwitch($value)
187
+	{
188
+		$this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
189
+	}
190
+
191
+
192
+	/**
193
+	 * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
194
+	 */
195
+	public function getCssUrl()
196
+	{
197
+		return $this->getViewState('CssUrl','default');
198
+	}
199
+
200
+	/**
201
+	 * @param string URL for the CSS file including all relevant CSS class definitions.
202
+	 */
203
+	public function setCssUrl($value)
204
+	{
205
+		$this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
206
+	}
207
+
208
+	/**
209
+	 * @return string CSS class for the whole tab control div. Defaults to 'tab-panel'.
210
+	 */
211
+	public function getCssClass()
212
+	{
213
+		$cssClass=parent::getCssClass();
214
+		return $cssClass===''?'tab-panel':$cssClass;
215
+	}
216
+
217
+	/**
218
+	 * @return string CSS class for the currently displayed view div. Defaults to 'tab-view'.
219
+	 */
220
+	public function getViewCssClass()
221
+	{
222
+		return $this->getViewStyle()->getCssClass();
223
+	}
224
+
225
+	/**
226
+	 * @param string CSS class for the currently displayed view div.
227
+	 */
228
+	public function setViewCssClass($value)
229
+	{
230
+		$this->getViewStyle()->setCssClass($value);
231
+	}
232 232
 
233 233
 	/**
234 234
 	 * @return TStyle the style for all the view div
@@ -244,21 +244,21 @@  discard block
 block discarded – undo
244 244
 		return $style;
245 245
 	}
246 246
 
247
-    /**
248
-     * @return string CSS class for non-active tabs. Defaults to 'tab-normal'.
249
-     */
250
-    public function getTabCssClass()
251
-    {
252
-        return $this->getTabStyle()->getCssClass();
253
-    }
247
+	/**
248
+	 * @return string CSS class for non-active tabs. Defaults to 'tab-normal'.
249
+	 */
250
+	public function getTabCssClass()
251
+	{
252
+		return $this->getTabStyle()->getCssClass();
253
+	}
254 254
 
255
-    /**
256
-     * @param string CSS class for non-active tabs.
257
-     */
258
-    public function setTabCssClass($value)
259
-    {
260
-        $this->getTabStyle()->setCssClass($value);
261
-    }
255
+	/**
256
+	 * @param string CSS class for non-active tabs.
257
+	 */
258
+	public function setTabCssClass($value)
259
+	{
260
+		$this->getTabStyle()->setCssClass($value);
261
+	}
262 262
 
263 263
 	/**
264 264
 	 * @return TStyle the style for all the inactive tab div
@@ -274,21 +274,21 @@  discard block
 block discarded – undo
274 274
 		return $style;
275 275
 	}
276 276
 
277
-    /**
278
-     * @return string CSS class for the active tab. Defaults to 'tab-active'.
279
-     */
280
-    public function getActiveTabCssClass()
281
-    {
282
-        return $this->getActiveTabStyle()->getCssClass();
283
-    }
284
-
285
-    /**
286
-     * @param string CSS class for the active tab.
287
-     */
288
-    public function setActiveTabCssClass($value)
289
-    {
290
-        $this->getActiveTabStyle()->setCssClass($value);
291
-    }
277
+	/**
278
+	 * @return string CSS class for the active tab. Defaults to 'tab-active'.
279
+	 */
280
+	public function getActiveTabCssClass()
281
+	{
282
+		return $this->getActiveTabStyle()->getCssClass();
283
+	}
284
+
285
+	/**
286
+	 * @param string CSS class for the active tab.
287
+	 */
288
+	public function setActiveTabCssClass($value)
289
+	{
290
+		$this->getActiveTabStyle()->setCssClass($value);
291
+	}
292 292
 
293 293
 	/**
294 294
 	 * @return TStyle the style for the active tab div
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,15 +136,13 @@  discard block
 block discarded – undo
136 136
 				$activeView=$views->itemAt($index);
137 137
 			else
138 138
 				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id);
139
-		}
140
-		else if(($index=$this->getActiveViewIndex())>=0)
139
+		} else if(($index=$this->getActiveViewIndex())>=0)
141 140
 		{
142 141
 			if($index<$views->getCount())
143 142
 				$activeView=$views->itemAt($index);
144 143
 			else
145 144
 				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index);
146
-		}
147
-		else
145
+		} else
148 146
 		{
149 147
 			foreach($views as $index=>$view)
150 148
 			{
@@ -320,8 +318,7 @@  discard block
 block discarded – undo
320 318
 				$this->setActiveViewIndex($index);
321 319
 				$this->setActiveViewID($view->getID(false));
322 320
 				$view->setActive(true);
323
-			}
324
-			else
321
+			} else
325 322
 				$v->setActive(false);
326 323
 		}
327 324
 	}
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function getActiveViewIndex()
96 96
 	{
97
-		return $this->getViewState('ActiveViewIndex',0);
97
+		return $this->getViewState('ActiveViewIndex', 0);
98 98
 	}
99 99
 
100 100
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function setActiveViewIndex($value)
105 105
 	{
106
-		$this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0);
106
+		$this->setViewState('ActiveViewIndex', TPropertyValue::ensureInteger($value), 0);
107 107
 	}
108 108
 
109 109
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function getActiveViewID()
116 116
     {
117
-		return $this->getViewState('ActiveViewID','');
117
+		return $this->getViewState('ActiveViewID', '');
118 118
     }
119 119
 
120 120
     /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function setActiveViewID($value)
124 124
     {
125
-		$this->setViewState('ActiveViewID',$value,'');
125
+		$this->setViewState('ActiveViewID', $value, '');
126 126
     }
127 127
 
128 128
 	/**
@@ -138,17 +138,17 @@  discard block
 block discarded – undo
138 138
 		$views=$this->getViews();
139 139
 		if(($id=$this->getActiveViewID())!=='')
140 140
 		{
141
-			if(($index=$views->findIndexByID($id))>=0)
141
+			if(($index=$views->findIndexByID($id)) >= 0)
142 142
 				$activeView=$views->itemAt($index);
143 143
 			else
144
-				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id);
144
+				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid', $id);
145 145
 		}
146
-		else if(($index=$this->getActiveViewIndex())>=0)
146
+		else if(($index=$this->getActiveViewIndex()) >= 0)
147 147
 		{
148
-			if($index<$views->getCount())
148
+			if($index < $views->getCount())
149 149
 				$activeView=$views->itemAt($index);
150 150
 			else
151
-				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index);
151
+				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid', $index);
152 152
 		}
153 153
 		else
154 154
 		{
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 */
173 173
 	public function setActiveView($view)
174 174
 	{
175
-		if($this->getViews()->indexOf($view)>=0)
175
+		if($this->getViews()->indexOf($view) >= 0)
176 176
 			$this->activateView($view);
177 177
 		else
178 178
 			throw new TInvalidOperationException('tabpanel_view_inexistent');
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function setAutoSwitch($value)
193 193
     {
194
-        $this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
194
+        $this->setViewState('AutoSwitch', TPropertyValue::ensureBoolean($value));
195 195
     }
196 196
 
197 197
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function getCssUrl()
202 202
     {
203
-        return $this->getViewState('CssUrl','default');
203
+        return $this->getViewState('CssUrl', 'default');
204 204
     }
205 205
 
206 206
     /**
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function setCssUrl($value)
210 210
     {
211
-        $this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
211
+        $this->setViewState('CssUrl', TPropertyValue::ensureString($value), '');
212 212
     }
213 213
 
214 214
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public function getCssClass()
218 218
     {
219 219
     	$cssClass=parent::getCssClass();
220
-    	return $cssClass===''?'tab-panel':$cssClass;
220
+    	return $cssClass==='' ? 'tab-panel' : $cssClass;
221 221
     }
222 222
 
223 223
     /**
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function getViewStyle()
243 243
 	{
244
-		if(($style=$this->getViewState('ViewStyle',null))===null)
244
+		if(($style=$this->getViewState('ViewStyle', null))===null)
245 245
 		{
246 246
 			$style=new TStyle;
247 247
 			$style->setCssClass('tab-view');
248
-			$this->setViewState('ViewStyle',$style,null);
248
+			$this->setViewState('ViewStyle', $style, null);
249 249
 		}
250 250
 		return $style;
251 251
 	}
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
 	 */
272 272
 	public function getTabStyle()
273 273
 	{
274
-		if(($style=$this->getViewState('TabStyle',null))===null)
274
+		if(($style=$this->getViewState('TabStyle', null))===null)
275 275
 		{
276 276
 			$style=new TStyle;
277 277
 			$style->setCssClass('tab-normal');
278
-			$this->setViewState('TabStyle',$style,null);
278
+			$this->setViewState('TabStyle', $style, null);
279 279
 		}
280 280
 		return $style;
281 281
 	}
@@ -301,11 +301,11 @@  discard block
 block discarded – undo
301 301
 	 */
302 302
 	public function getActiveTabStyle()
303 303
 	{
304
-		if(($style=$this->getViewState('ActiveTabStyle',null))===null)
304
+		if(($style=$this->getViewState('ActiveTabStyle', null))===null)
305 305
 		{
306 306
 			$style=new TStyle;
307 307
 			$style->setCssClass('tab-active');
308
-			$this->setViewState('ActiveTabStyle',$style,null);
308
+			$this->setViewState('ActiveTabStyle', $style, null);
309 309
 		}
310 310
 		return $style;
311 311
 	}
@@ -339,11 +339,11 @@  discard block
 block discarded – undo
339 339
 	 * @param array the input data collection
340 340
 	 * @return boolean whether the data of the control has been changed
341 341
 	 */
342
-	public function loadPostData($key,$values)
342
+	public function loadPostData($key, $values)
343 343
 	{
344 344
 		if(($index=$values[$this->getClientID().'_1'])!==null)
345 345
 		{
346
-			$index=(int)$index;
346
+			$index=(int) $index;
347 347
 			$currentIndex=$this->getActiveViewIndex();
348 348
 			if($currentIndex!==$index)
349 349
 			{
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	 */
384 384
 	protected function addAttributesToRender($writer)
385 385
 	{
386
-		$writer->addAttribute('id',$this->getClientID());
386
+		$writer->addAttribute('id', $this->getClientID());
387 387
 		$this->setCssClass($this->getCssClass());
388 388
 		parent::addAttributesToRender($writer);
389 389
 	}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	public function onPreRender($param)
397 397
 	{
398 398
 		parent::onPreRender($param);
399
-		$this->getActiveView();  // determine the active view
399
+		$this->getActiveView(); // determine the active view
400 400
 		$this->registerStyleSheet();
401 401
 
402 402
 		$page=$this->getPage();
@@ -411,17 +411,17 @@  discard block
 block discarded – undo
411 411
 	 */
412 412
 	protected function registerStyleSheet()
413 413
 	{
414
-		$url = $this->getCssUrl();
414
+		$url=$this->getCssUrl();
415 415
 
416
-		if($url === '') {
416
+		if($url==='') {
417 417
 			return;
418 418
 		}
419 419
 
420
-		if($url === 'default') {
421
-			$url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
420
+		if($url==='default') {
421
+			$url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
422 422
 		}
423 423
 
424
-		if($url !== '') {
424
+		if($url!=='') {
425 425
 			$this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
426 426
 		}
427 427
 	}
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 		$code="new $className($options);";
440 440
 		$cs->registerEndScript("prado:$id", $code);
441 441
 		// ensure an item is always active and visible
442
-		$index = $this->getActiveViewIndex();
442
+		$index=$this->getActiveViewIndex();
443 443
 		if(!$this->getViews()->itemAt($index)->Visible)
444 444
 			$index=0;
445 445
 		$cs->registerHiddenField($id.'_1', $index);
@@ -460,19 +460,19 @@  discard block
 block discarded – undo
460 460
 	 */
461 461
 	protected function getClientOptions()
462 462
 	{
463
-		$options['ID'] = $this->getClientID();
464
-		$options['ActiveCssClass'] = $this->getActiveTabCssClass();
465
-		$options['NormalCssClass'] = $this->getTabCssClass();
466
-		$viewIDs = array();
467
-		$viewVis = array();
463
+		$options['ID']=$this->getClientID();
464
+		$options['ActiveCssClass']=$this->getActiveTabCssClass();
465
+		$options['NormalCssClass']=$this->getTabCssClass();
466
+		$viewIDs=array();
467
+		$viewVis=array();
468 468
 		foreach($this->getViews() as $view)
469 469
 		{
470
-			$viewIDs[] = $view->getClientID();
471
-			$viewVis[] = $view->getVisible();
470
+			$viewIDs[]=$view->getClientID();
471
+			$viewVis[]=$view->getVisible();
472 472
 		}
473
-		$options['Views'] = $viewIDs;
474
-		$options['ViewsVis'] = $viewVis;
475
-		$options['AutoSwitch'] = $this->getAutoSwitch();
473
+		$options['Views']=$viewIDs;
474
+		$options['ViewsVis']=$viewVis;
475
+		$options['AutoSwitch']=$this->getAutoSwitch();
476 476
 
477 477
 		return $options;
478 478
 	}
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 	public function renderContents($writer)
508 508
 	{
509 509
 		$views=$this->getViews();
510
-		if($views->getCount()>0)
510
+		if($views->getCount() > 0)
511 511
 		{
512 512
 			$writer->writeLine();
513 513
 			// render tab bar
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDatePicker.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@
 block discarded – undo
90 90
 	{
91 91
 		return array('altField', 'altFormat', 'appendText', 'autoSize', 'buttonImage', 'buttonImageOnly', 'buttonText', 'calculateWeek',
92 92
 								 'changeMonth', 'changeYear', 'closeText', 'constrainInput', 'currentText', 'dateFormat', 'dayNames', 'dayNamesMin',
93
-				         'dayNamesShort', 'defaultDate', 'duration', 'firstDay', 'gotoCurrent', 'hideIfNoPrevNext', 'isRTL', 'maxDate',
93
+						 'dayNamesShort', 'defaultDate', 'duration', 'firstDay', 'gotoCurrent', 'hideIfNoPrevNext', 'isRTL', 'maxDate',
94 94
 								 'minDate', 'monthNames', 'monthNamesShort', 'navigationAsDateFormat', 'nextText', 'numberOfMonths', 'prevText',
95 95
 								 'selectOtherMonths', 'shortYearCutoff', 'showAnim', 'showButtonPanel', 'showCurrentAtPos', 'showMonthAfterYear',
96
-				         'showOn', 'showOptions', 'showOtherMonths', 'showWeek', 'stepMonths', 'weekHeader', 'yearRange', 'yearSuffix',
96
+						 'showOn', 'showOptions', 'showOtherMonths', 'showWeek', 'stepMonths', 'weekHeader', 'yearRange', 'yearSuffix',
97 97
 								 'beforeShow', 'beforeShowDay', 'onChangeMonthYear', 'onClose', 'onSelect');
98 98
 	}
99 99
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Prado\Web\UI\JuiControls;
13 13
 
14 14
 use Prado\Exceptions\TNotSupportedException;
15
-use Prado\Web\Javascripts\TJavaScript;
16 15
 use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
17 16
 use Prado\Web\UI\ActiveControls\TActivePanel;
18 17
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * it will register an additional clientscript to set the language specific global default settings.
44 44
 	 * @var boolean true, if this is the first instance of TJuiDatePicker, false otherwise
45 45
 	 */
46
-	private static $_first = true;
46
+	private static $_first=true;
47 47
 
48 48
 	/**
49 49
 	 * Creates a new callback control, sets the adapter to
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function getOptions()
80 80
 	{
81
-		if (($options=$this->getViewState('JuiOptions'))===null)
81
+		if(($options=$this->getViewState('JuiOptions'))===null)
82 82
 		{
83 83
 		  $options=new TJuiControlOptions($this);
84 84
 		  $this->setViewState('JuiOptions', $options);
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 	 */
173 173
 	protected function getCurrentCulture()
174 174
 	{
175
-		$app = $this->getApplication()->getGlobalization(false);
176
-		return $this->getCulture() == '' ?
175
+		$app=$this->getApplication()->getGlobalization(false);
176
+		return $this->getCulture()=='' ?
177 177
 				($app ? $app->getCulture() : 'en') : $this->getCulture();
178 178
 	}
179 179
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	public function getDateFormat()
184 184
 	{
185
-		return $this->getViewState('DateFormat','dd-MM-yyyy');
185
+		return $this->getViewState('DateFormat', 'dd-MM-yyyy');
186 186
 	}
187 187
 
188 188
 	/**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 */
192 192
 	public function setDateFormat($value)
193 193
 	{
194
-		$this->setViewState('DateFormat',$value,'dd-MM-yyyy');
194
+		$this->setViewState('DateFormat', $value, 'dd-MM-yyyy');
195 195
 	}
196 196
 
197 197
 	/**
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
 			$this->setText('');
258 258
 		else
259 259
 		{
260
-			$date = TPropertyValue::ensureFloat($value);
261
-			$formatter = new TSimpleDateFormatter($this->getDateFormat());
260
+			$date=TPropertyValue::ensureFloat($value);
261
+			$formatter=new TSimpleDateFormatter($this->getDateFormat());
262 262
 			$this->setText($formatter->format($date));
263 263
 		}
264 264
 	}
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
 	 */
270 270
 	protected function getTimeStampFromText()
271 271
 	{
272
-		$pattern = $this->getDateFormat();
273
-		$pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern);
274
-		$formatter = new TSimpleDateFormatter($pattern);
272
+		$pattern=$this->getDateFormat();
273
+		$pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern);
274
+		$formatter=new TSimpleDateFormatter($pattern);
275 275
 		return $formatter->parse($this->getText());
276 276
 	}
277 277
 
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 	 */
283 283
 	public function getValidationPropertyValue()
284 284
 	{
285
-		if(($text = $this->getText()) === '')
285
+		if(($text=$this->getText())==='')
286 286
 			return '';
287
-		$date = $this->getTimeStamp();
288
-		return $date == null ? $text : $date;
287
+		$date=$this->getTimeStamp();
288
+		return $date==null ? $text : $date;
289 289
 	}
290 290
 
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveMultiView.php 3 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 class TActiveMultiView extends TMultiView implements IActiveControl
31 31
 {
32 32
 	/**
33
-	* Creates a new callback control, sets the adapter to
34
-	* TActiveControlAdapter.
35
-	*/
33
+	 * Creates a new callback control, sets the adapter to
34
+	 * TActiveControlAdapter.
35
+	 */
36 36
 	public function __construct()
37 37
 	{
38 38
 		parent::__construct();
@@ -40,28 +40,28 @@  discard block
 block discarded – undo
40 40
 	}
41 41
 
42 42
 	/**
43
-	* @return TBaseActiveControl standard active control options.
44
-	*/
43
+	 * @return TBaseActiveControl standard active control options.
44
+	 */
45 45
 	public function getActiveControl()
46 46
 	{
47 47
 		return $this->getAdapter()->getBaseActiveControl();
48 48
 	}
49 49
 
50 50
 	/**
51
-	* Returns the id of the surrounding container (span).
52
-	* @return string container id
53
-	*/
51
+	 * Returns the id of the surrounding container (span).
52
+	 * @return string container id
53
+	 */
54 54
 	protected function getContainerID()
55 55
 	{
56 56
 		return $this->ClientID.'_Container';
57 57
 	}
58 58
 
59 59
 	/**
60
-	* Renders the TActiveMultiView.
61
-	* If the MutliView did not pass the prerender phase yet, it will register itself for rendering later.
62
-	* Else it will call the {@link renderMultiView()} method which will do the rendering of the MultiView.
63
-	* @param THtmlWriter writer for the rendering purpose
64
-	*/
60
+	 * Renders the TActiveMultiView.
61
+	 * If the MutliView did not pass the prerender phase yet, it will register itself for rendering later.
62
+	 * Else it will call the {@link renderMultiView()} method which will do the rendering of the MultiView.
63
+	 * @param THtmlWriter writer for the rendering purpose
64
+	 */
65 65
 	public function render($writer)
66 66
 	{
67 67
 		if($this->getHasPreRendered()) {
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 	}
75 75
 
76 76
 	/**
77
-	* Renders the TActiveMultiView by writing a span tag with the container id obtained from {@link getContainerID()}
78
-	* which will be called by the replacement method of the client script to update it's content.
79
-	* @param $writer THtmlWriter writer for the rendering purpose
80
-	*/
77
+	 * Renders the TActiveMultiView by writing a span tag with the container id obtained from {@link getContainerID()}
78
+	 * which will be called by the replacement method of the client script to update it's content.
79
+	 * @param $writer THtmlWriter writer for the rendering purpose
80
+	 */
81 81
 	protected function renderMultiView($writer)
82 82
 	{
83 83
 		$writer->addAttribute('id', $this->getContainerID());
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	}
88 88
 
89 89
 	/**
90
-	* @param integer the zero-based index of the current view in the view collection. -1 if no active view.
91
-	* @throws TInvalidDataValueException if the view index is invalid
92
-	*/
90
+	 * @param integer the zero-based index of the current view in the view collection. -1 if no active view.
91
+	 * @throws TInvalidDataValueException if the view index is invalid
92
+	 */
93 93
 	public function setActiveViewIndex($value)
94 94
 	{
95 95
 		$old=parent::getActiveViewIndex();
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	}
100 100
 
101 101
 	/**
102
-	* @param TView the view to be activated
103
-	* @throws TInvalidOperationException if the view is not in the view collection
104
-	*/
102
+	 * @param TView the view to be activated
103
+	 * @throws TInvalidOperationException if the view is not in the view collection
104
+	 */
105 105
 	public function setActiveView($value)
106 106
 	{
107 107
 		$old=parent::getActiveView();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 		if($this->getHasPreRendered()) {
68 68
 			$this->renderMultiView($writer);
69 69
 			if($this->getActiveControl()->canUpdateClientSide())
70
-				$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer);
70
+				$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
71 71
 		}
72 72
 		else
73
-			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
73
+			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
74 74
 	}
75 75
 
76 76
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		$old=parent::getActiveViewIndex();
96 96
 		parent::setActiveViewIndex($value);
97 97
 		if($this->getActiveControl()->canUpdateClientSide() && $old!=$value)
98
-			$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
98
+			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
99 99
 	}
100 100
 
101 101
 	/**
@@ -107,6 +107,6 @@  discard block
 block discarded – undo
107 107
 		$old=parent::getActiveView();
108 108
 		parent::setActiveView($value);
109 109
 		if($this->getActiveControl()->canUpdateClientSide() && $old!=$value)
110
-			$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
110
+			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
111 111
 	}
112 112
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDatePicker.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
 
33 33
 	/**
34 34
 	 * @return boolean a value indicating whether an automatic postback to the server
35
-     * will occur whenever the user modifies the text in the TActiveDatePicker control and
36
-     * then tabs out of the component. Defaults to true.
35
+	 * will occur whenever the user modifies the text in the TActiveDatePicker control and
36
+	 * then tabs out of the component. Defaults to true.
37 37
 	 */
38 38
 	public function getAutoPostBack()
39 39
 	{
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public function getAutoPostBack()
48 48
 	{
49
-		return $this->getViewState('AutoPostBack',true);
49
+		return $this->getViewState('AutoPostBack', true);
50 50
 	}
51 51
 
52 52
 	/**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	public function setAutoPostBack($value)
59 59
 	{
60
-		$this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),true);
60
+		$this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), true);
61 61
 	}
62 62
 
63 63
 	/**
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	protected function getDatePickerOptions()
68 68
 	{
69
-		$options = parent::getDatePickerOptions();
69
+		$options=parent::getDatePickerOptions();
70 70
 		$options['CausesValidation']=$this->getCausesValidation();
71 71
 		$options['ValidationGroup']=$this->getValidationGroup();
72
-		$options['EventTarget'] = $this->getUniqueID();
73
-		$options['ShowCalendar'] = $this->getShowCalendar();
74
-		$options['AutoPostBack'] = $this->getAutoPostBack();
72
+		$options['EventTarget']=$this->getUniqueID();
73
+		$options['ShowCalendar']=$this->getShowCalendar();
74
+		$options['AutoPostBack']=$this->getAutoPostBack();
75 75
 		return $options;
76 76
 	}
77 77
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	/**
90 90
 	 * @return TBaseActiveCallbackControl standard callback control options.
91 91
 	 */
92
-	public function getActiveControl(){
92
+	public function getActiveControl() {
93 93
 		return $this->getAdapter()->getBaseActiveControl();
94 94
 	}
95 95
 
@@ -97,21 +97,21 @@  discard block
 block discarded – undo
97 97
 	 * Client-side Text property can only be updated after the OnLoad stage.
98 98
 	 * @param string text content for the textbox
99 99
 	 */
100
-	public function setText($value){
101
-		if(parent::getText() === $value)
100
+	public function setText($value) {
101
+		if(parent::getText()===$value)
102 102
 			return;
103 103
 
104 104
 		parent::setText($value);
105
-		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){
105
+		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) {
106 106
 			$cb=$this->getPage()->getCallbackClient();
107 107
 			$cb->setValue($this, $value);
108
-			if ($this->getInputMode()==TDatePickerInputMode::DropDownList)
108
+			if($this->getInputMode()==TDatePickerInputMode::DropDownList)
109 109
 			{
110
-				$s = new TDateTimeStamp;
111
-				$date = $s->getDate($this->getTimeStampFromText());
110
+				$s=new TDateTimeStamp;
111
+				$date=$s->getDate($this->getTimeStampFromText());
112 112
 				$id=$this->getClientID();
113 113
 				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'day', 'Value', $date['mday'], 'select');
114
-				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $date['mon']-1, 'select');
114
+				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $date['mon'] - 1, 'select');
115 115
 				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'year', 'Value', $date['year'], 'select');
116 116
 
117 117
 			}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 * This method is mainly used by framework and control developers.
125 125
 	 * @param TCallbackEventParameter the event parameter
126 126
 	 */
127
- 	public function raiseCallbackEvent($param){
127
+ 	public function raiseCallbackEvent($param) {
128 128
 		$this->onCallback($param);
129 129
 	}
130 130
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 * handler can be invoked.
136 136
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
137 137
 	 */
138
-	public function onCallback($param){
138
+	public function onCallback($param) {
139 139
 		$this->raiseEvent('OnCallback', $this, $param);
140 140
 	}
141 141
 
@@ -145,22 +145,22 @@  discard block
 block discarded – undo
145 145
 
146 146
 	protected function registerCalendarClientScriptPre()
147 147
 	{
148
-		$cs = $this->getPage()->getClientScript();
148
+		$cs=$this->getPage()->getClientScript();
149 149
 		$cs->registerPradoScript("activedatepicker");
150 150
 	}
151 151
 
152 152
 	protected function renderClientControlScript($writer)
153 153
 	{
154
-		$cs = $this->getPage()->getClientScript();
154
+		$cs=$this->getPage()->getClientScript();
155 155
 		if(!$cs->isEndScriptRegistered('TDatePicker.spacer'))
156 156
 		{
157
-			$spacer = $this->getAssetUrl('spacer.gif');
158
-			$code = "Prado.WebUI.TDatePicker.spacer = '$spacer';";
157
+			$spacer=$this->getAssetUrl('spacer.gif');
158
+			$code="Prado.WebUI.TDatePicker.spacer = '$spacer';";
159 159
 			$cs->registerEndScript('TDatePicker.spacer', $code);
160 160
 		}
161 161
 
162
-		$options = TJavaScript::encode($this->getDatePickerOptions());
163
-		$code = "new Prado.WebUI.TActiveDatePicker($options);";
162
+		$options=TJavaScript::encode($this->getDatePickerOptions());
163
+		$code="new Prado.WebUI.TActiveDatePicker($options);";
164 164
 		$cs->registerEndScript("prado:".$this->getClientID(), $code);
165 165
 	}
166 166
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveHiddenField.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  */
23 23
 class TActiveHiddenField extends THiddenField implements ICallbackEventHandler, IActiveControl
24 24
 {
25
-    /**
25
+	/**
26 26
 	 * Creates a new callback control, sets the adapter to
27 27
 	 * TActiveControlAdapter. If you override this class, be sure to set the
28 28
 	 * adapter appropriately by, for example, by calling this constructor.
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function setValue($value)
57 57
 	{
58
-		if(parent::getValue() === $value)
58
+		if(parent::getValue()===$value)
59 59
 			return;
60 60
 
61 61
 		parent::setValue($value);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	protected function addAttributesToRender($writer)
112 112
 	{
113 113
 		parent::addAttributesToRender($writer);
114
-		$writer->addAttribute('id',$this->getClientID());
114
+		$writer->addAttribute('id', $this->getClientID());
115 115
 		$this->getActiveControl()->registerCallbackClientScript(
116 116
 			$this->getClientClassName(), $this->getPostBackOptions());
117 117
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePanel.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@
 block discarded – undo
60 60
 	 * @param THtmlWriter the writer used for the rendering purpose
61 61
 	 */
62 62
 	protected function addAttributesToRender($writer) {
63
-	    $writer->addAttribute('id',$this->getClientID());
64
-	    parent::addAttributesToRender($writer);
63
+		$writer->addAttribute('id',$this->getClientID());
64
+		parent::addAttributesToRender($writer);
65 65
 	}
66 66
 
67 67
 	/**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * @param THtmlWriter the writer used for the rendering purpose
61 61
 	 */
62 62
 	protected function addAttributesToRender($writer) {
63
-	    $writer->addAttribute('id',$this->getClientID());
63
+	    $writer->addAttribute('id', $this->getClientID());
64 64
 	    parent::addAttributesToRender($writer);
65 65
 	}
66 66
 
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
 		{
78 78
 			parent::render($writer);
79 79
 			if($this->getActiveControl()->canUpdateClientSide())
80
-				$this->getPage()->getCallbackClient()->replaceContent($this,$writer);
80
+				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
81 81
 		}
82 82
 		else
83 83
 		{
84
-			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
85
-			if ($this->getHasControls())
84
+			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
85
+			if($this->getHasControls())
86 86
 			{
87 87
 				// If we update a TActivePanel on callback,
88 88
 				// We shouldn't update all childs, because the whole content will be replaced by
89 89
 				// the parent
90
-				foreach ($this->findControlsByType('IActiveControl', false) as $control)
90
+				foreach($this->findControlsByType('IActiveControl', false) as $control)
91 91
 				{
92 92
 						$control->getActiveControl()->setEnableUpdate(false);
93 93
 				}
Please login to merge, or discard this patch.