Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/I18N/core/CultureInfo.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -199,9 +199,9 @@
 block discarded – undo
199 199
 	}
200 200
 
201 201
 	/**
202
-	* Gets the CultureInfo that for this culture string
203
-	* @return CultureInfo invariant culture info is "en".
204
-	*/
202
+	 * Gets the CultureInfo that for this culture string
203
+	 * @return CultureInfo invariant culture info is "en".
204
+	 */
205 205
 	public static function getInstance($culture)
206 206
 	{
207 207
 		static $instances = array();
Please login to merge, or discard this patch.
framework/I18N/core/Gettext/TGettext.php 1 patch
Indentation   +209 added lines, -209 removed lines patch added patch discarded remove patch
@@ -58,229 +58,229 @@
 block discarded – undo
58 58
  */
59 59
 class TGettext
60 60
 {
61
-    /**
62
-     * strings
63
-     *
64
-     * associative array with all [msgid => msgstr] entries
65
-     *
66
-     * @access  protected
67
-     * @var     array
68
-    */
69
-    protected $strings = array();
61
+	/**
62
+	 * strings
63
+	 *
64
+	 * associative array with all [msgid => msgstr] entries
65
+	 *
66
+	 * @access  protected
67
+	 * @var     array
68
+	 */
69
+	protected $strings = array();
70 70
 
71
-    /**
72
-     * meta
73
-     *
74
-     * associative array containing meta
75
-     * information like project name or content type
76
-     *
77
-     * @access  protected
78
-     * @var     array
79
-     */
80
-    protected $meta = array();
71
+	/**
72
+	 * meta
73
+	 *
74
+	 * associative array containing meta
75
+	 * information like project name or content type
76
+	 *
77
+	 * @access  protected
78
+	 * @var     array
79
+	 */
80
+	protected $meta = array();
81 81
 
82
-    /**
83
-     * file path
84
-     *
85
-     * @access  protected
86
-     * @var     string
87
-     */
88
-    protected $file = '';
82
+	/**
83
+	 * file path
84
+	 *
85
+	 * @access  protected
86
+	 * @var     string
87
+	 */
88
+	protected $file = '';
89 89
 
90
-    /**
91
-     * Factory
92
-     *
93
-     * @static
94
-     * @access  public
95
-     * @return  object  Returns File_Gettext_PO or File_Gettext_MO on success
96
-     *                  or PEAR_Error on failure.
97
-     * @param   string  $format MO or PO
98
-     * @param   string  $file   path to GNU gettext file
99
-     */
100
-    static function factory($format, $file = '')
101
-    {
102
-        $format = strToUpper($format);
103
-        $filename = dirname(__FILE__).'/'.$format.'.php';
104
-        if(is_file($filename) == false)
105
-        	throw new Exception ("Class file $file not found");
90
+	/**
91
+	 * Factory
92
+	 *
93
+	 * @static
94
+	 * @access  public
95
+	 * @return  object  Returns File_Gettext_PO or File_Gettext_MO on success
96
+	 *                  or PEAR_Error on failure.
97
+	 * @param   string  $format MO or PO
98
+	 * @param   string  $file   path to GNU gettext file
99
+	 */
100
+	static function factory($format, $file = '')
101
+	{
102
+		$format = strToUpper($format);
103
+		$filename = dirname(__FILE__).'/'.$format.'.php';
104
+		if(is_file($filename) == false)
105
+			throw new Exception ("Class file $file not found");
106 106
 
107
-        include_once $filename;
108
-        $class = 'TGettext_' . $format;
107
+		include_once $filename;
108
+		$class = 'TGettext_' . $format;
109 109
 
110
-        return new $class($file);
111
-    }
110
+		return new $class($file);
111
+	}
112 112
 
113
-    /**
114
-     * poFile2moFile
115
-     *
116
-     * That's a simple fake of the 'msgfmt' console command.  It reads the
117
-     * contents of a GNU PO file and saves them to a GNU MO file.
118
-     *
119
-     * @static
120
-     * @access  public
121
-     * @return  mixed   Returns true on success or PEAR_Error on failure.
122
-     * @param   string  $pofile path to GNU PO file
123
-     * @param   string  $mofile path to GNU MO file
124
-     */
125
-    static function poFile2moFile($pofile, $mofile)
126
-    {
127
-        if (!is_file($pofile)) {
128
-            throw new Exception("File $pofile doesn't exist.");
129
-        }
113
+	/**
114
+	 * poFile2moFile
115
+	 *
116
+	 * That's a simple fake of the 'msgfmt' console command.  It reads the
117
+	 * contents of a GNU PO file and saves them to a GNU MO file.
118
+	 *
119
+	 * @static
120
+	 * @access  public
121
+	 * @return  mixed   Returns true on success or PEAR_Error on failure.
122
+	 * @param   string  $pofile path to GNU PO file
123
+	 * @param   string  $mofile path to GNU MO file
124
+	 */
125
+	static function poFile2moFile($pofile, $mofile)
126
+	{
127
+		if (!is_file($pofile)) {
128
+			throw new Exception("File $pofile doesn't exist.");
129
+		}
130 130
 
131
-        include_once dirname(__FILE__).'/PO.php';
131
+		include_once dirname(__FILE__).'/PO.php';
132 132
 
133
-        $PO = new TGettext_PO($pofile);
134
-        if (true !== ($e = $PO->load())) {
135
-            return $e;
136
-        }
133
+		$PO = new TGettext_PO($pofile);
134
+		if (true !== ($e = $PO->load())) {
135
+			return $e;
136
+		}
137 137
 
138
-        $MO = $PO->toMO();
139
-        if (true !== ($e = $MO->save($mofile))) {
140
-            return $e;
141
-        }
142
-        unset($PO, $MO);
138
+		$MO = $PO->toMO();
139
+		if (true !== ($e = $MO->save($mofile))) {
140
+			return $e;
141
+		}
142
+		unset($PO, $MO);
143 143
 
144
-        return true;
145
-    }
144
+		return true;
145
+	}
146 146
 
147
-    /**
148
-     * prepare
149
-     *
150
-     * @static
151
-     * @access  protected
152
-     * @return  string
153
-     * @param   string  $string
154
-     * @param   bool    $reverse
155
-     */
156
-    static function prepare($string, $reverse = false)
157
-    {
158
-        if ($reverse) {
159
-            $smap = array('"', "\n", "\t", "\r");
160
-            $rmap = array('\"', '\\n"' . "\n" . '"', '\\t', '\\r');
161
-            return (string) str_replace($smap, $rmap, $string);
162
-        } else {
163
-        	$string = preg_replace('/"\s+"/', '', $string);
164
-            $smap = array('\\n', '\\r', '\\t', '\"');
165
-            $rmap = array("\n", "\r", "\t", '"');
166
-            return (string) str_replace($smap, $rmap, $string);
167
-        }
168
-    }
147
+	/**
148
+	 * prepare
149
+	 *
150
+	 * @static
151
+	 * @access  protected
152
+	 * @return  string
153
+	 * @param   string  $string
154
+	 * @param   bool    $reverse
155
+	 */
156
+	static function prepare($string, $reverse = false)
157
+	{
158
+		if ($reverse) {
159
+			$smap = array('"', "\n", "\t", "\r");
160
+			$rmap = array('\"', '\\n"' . "\n" . '"', '\\t', '\\r');
161
+			return (string) str_replace($smap, $rmap, $string);
162
+		} else {
163
+			$string = preg_replace('/"\s+"/', '', $string);
164
+			$smap = array('\\n', '\\r', '\\t', '\"');
165
+			$rmap = array("\n", "\r", "\t", '"');
166
+			return (string) str_replace($smap, $rmap, $string);
167
+		}
168
+	}
169 169
 
170
-    /**
171
-     * meta2array
172
-     *
173
-     * @static
174
-     * @access  public
175
-     * @return  array
176
-     * @param   string  $meta
177
-     */
178
-    static function meta2array($meta)
179
-    {
180
-        $array = array();
181
-        foreach (explode("\n", $meta) as $info) {
182
-            if ($info = trim($info)) {
183
-                list($key, $value) = explode(':', $info, 2);
184
-                $array[trim($key)] = trim($value);
185
-            }
186
-        }
187
-        return $array;
188
-    }
170
+	/**
171
+	 * meta2array
172
+	 *
173
+	 * @static
174
+	 * @access  public
175
+	 * @return  array
176
+	 * @param   string  $meta
177
+	 */
178
+	static function meta2array($meta)
179
+	{
180
+		$array = array();
181
+		foreach (explode("\n", $meta) as $info) {
182
+			if ($info = trim($info)) {
183
+				list($key, $value) = explode(':', $info, 2);
184
+				$array[trim($key)] = trim($value);
185
+			}
186
+		}
187
+		return $array;
188
+	}
189 189
 
190
-    /**
191
-     * toArray
192
-     *
193
-     * Returns meta info and strings as an array of a structure like that:
194
-     * <code>
195
-     *   array(
196
-     *       'meta' => array(
197
-     *           'Content-Type'      => 'text/plain; charset=iso-8859-1',
198
-     *           'Last-Translator'   => 'Michael Wallner <[email protected]>',
199
-     *           'PO-Revision-Date'  => '2004-07-21 17:03+0200',
200
-     *           'Language-Team'     => 'German <[email protected]>',
201
-     *       ),
202
-     *       'strings' => array(
203
-     *           'All rights reserved'   => 'Alle Rechte vorbehalten',
204
-     *           'Welcome'               => 'Willkommen',
205
-     *           // ...
206
-     *       )
207
-     *   )
208
-     * </code>
209
-     *
210
-     * @see     fromArray()
211
-     * @access  protected
212
-     * @return  array
213
-     */
214
-    function toArray()
215
-    {
216
-    	return array('meta' => $this->meta, 'strings' => $this->strings);
217
-    }
190
+	/**
191
+	 * toArray
192
+	 *
193
+	 * Returns meta info and strings as an array of a structure like that:
194
+	 * <code>
195
+	 *   array(
196
+	 *       'meta' => array(
197
+	 *           'Content-Type'      => 'text/plain; charset=iso-8859-1',
198
+	 *           'Last-Translator'   => 'Michael Wallner <[email protected]>',
199
+	 *           'PO-Revision-Date'  => '2004-07-21 17:03+0200',
200
+	 *           'Language-Team'     => 'German <[email protected]>',
201
+	 *       ),
202
+	 *       'strings' => array(
203
+	 *           'All rights reserved'   => 'Alle Rechte vorbehalten',
204
+	 *           'Welcome'               => 'Willkommen',
205
+	 *           // ...
206
+	 *       )
207
+	 *   )
208
+	 * </code>
209
+	 *
210
+	 * @see     fromArray()
211
+	 * @access  protected
212
+	 * @return  array
213
+	 */
214
+	function toArray()
215
+	{
216
+		return array('meta' => $this->meta, 'strings' => $this->strings);
217
+	}
218 218
 
219
-    /**
220
-     * fromArray
221
-     *
222
-     * Assigns meta info and strings from an array of a structure like that:
223
-     * <code>
224
-     *   array(
225
-     *       'meta' => array(
226
-     *           'Content-Type'      => 'text/plain; charset=iso-8859-1',
227
-     *           'Last-Translator'   => 'Michael Wallner <[email protected]>',
228
-     *           'PO-Revision-Date'  => date('Y-m-d H:iO'),
229
-     *           'Language-Team'     => 'German <[email protected]>',
230
-     *       ),
231
-     *       'strings' => array(
232
-     *           'All rights reserved'   => 'Alle Rechte vorbehalten',
233
-     *           'Welcome'               => 'Willkommen',
234
-     *           // ...
235
-     *       )
236
-     *   )
237
-     * </code>
238
-     *
239
-     * @see     toArray()
240
-     * @access  protected
241
-     * @return  bool
242
-     * @param   array       $array
243
-     */
244
-    function fromArray($array)
245
-    {
246
-    	if (!array_key_exists('strings', $array)) {
247
-    	    if (count($array) != 2) {
248
-                return false;
249
-    	    } else {
250
-    	        list($this->meta, $this->strings) = $array;
251
-            }
252
-    	} else {
253
-            $this->meta = @$array['meta'];
254
-            $this->strings = @$array['strings'];
255
-        }
256
-        return true;
257
-    }
219
+	/**
220
+	 * fromArray
221
+	 *
222
+	 * Assigns meta info and strings from an array of a structure like that:
223
+	 * <code>
224
+	 *   array(
225
+	 *       'meta' => array(
226
+	 *           'Content-Type'      => 'text/plain; charset=iso-8859-1',
227
+	 *           'Last-Translator'   => 'Michael Wallner <[email protected]>',
228
+	 *           'PO-Revision-Date'  => date('Y-m-d H:iO'),
229
+	 *           'Language-Team'     => 'German <[email protected]>',
230
+	 *       ),
231
+	 *       'strings' => array(
232
+	 *           'All rights reserved'   => 'Alle Rechte vorbehalten',
233
+	 *           'Welcome'               => 'Willkommen',
234
+	 *           // ...
235
+	 *       )
236
+	 *   )
237
+	 * </code>
238
+	 *
239
+	 * @see     toArray()
240
+	 * @access  protected
241
+	 * @return  bool
242
+	 * @param   array       $array
243
+	 */
244
+	function fromArray($array)
245
+	{
246
+		if (!array_key_exists('strings', $array)) {
247
+			if (count($array) != 2) {
248
+				return false;
249
+			} else {
250
+				list($this->meta, $this->strings) = $array;
251
+			}
252
+		} else {
253
+			$this->meta = @$array['meta'];
254
+			$this->strings = @$array['strings'];
255
+		}
256
+		return true;
257
+	}
258 258
 
259
-    /**
260
-     * toMO
261
-     *
262
-     * @access  protected
263
-     * @return  object  File_Gettext_MO
264
-     */
265
-    function toMO()
266
-    {
267
-        include_once dirname(__FILE__).'/MO.php';
268
-        $MO = new TGettext_MO;
269
-        $MO->fromArray($this->toArray());
270
-        return $MO;
271
-    }
259
+	/**
260
+	 * toMO
261
+	 *
262
+	 * @access  protected
263
+	 * @return  object  File_Gettext_MO
264
+	 */
265
+	function toMO()
266
+	{
267
+		include_once dirname(__FILE__).'/MO.php';
268
+		$MO = new TGettext_MO;
269
+		$MO->fromArray($this->toArray());
270
+		return $MO;
271
+	}
272 272
 
273
-    /**
274
-     * toPO
275
-     *
276
-     * @access  protected
277
-     * @return  object      File_Gettext_PO
278
-     */
279
-    function toPO()
280
-    {
281
-        include_once dirname(__FILE__).'/PO.php';
282
-        $PO = new TGettext_PO;
283
-        $PO->fromArray($this->toArray());
284
-        return $PO;
285
-    }
273
+	/**
274
+	 * toPO
275
+	 *
276
+	 * @access  protected
277
+	 * @return  object      File_Gettext_PO
278
+	 */
279
+	function toPO()
280
+	{
281
+		include_once dirname(__FILE__).'/PO.php';
282
+		$PO = new TGettext_PO;
283
+		$PO->fromArray($this->toArray());
284
+		return $PO;
285
+	}
286 286
 }
Please login to merge, or discard this patch.
framework/Util/TDataFieldAccessor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
 				$tmp = $data;
61 61
 				foreach (explode(".", $field) as $f)
62
-				    $tmp = $tmp[$f];
62
+					$tmp = $tmp[$f];
63 63
 				return $tmp;
64 64
 			}
65 65
 			else if(is_object($data))
Please login to merge, or discard this patch.
framework/Caching/TMemCache.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -104,30 +104,30 @@  discard block
 block discarded – undo
104 104
 	/**
105 105
 	 * @var boolean controls the use of a persistent connection. Default to true.
106 106
 	 */
107
-    private $_persistence = true;
108
-    /**
109
-     * @var integer number of buckets to create for this server which in turn control its
110
-     * probability of it being selected. The probability is relative to the total weight
111
-     * of all servers.
112
-     */
113
-    private $_weight = 1;
107
+	private $_persistence = true;
108
+	/**
109
+	 * @var integer number of buckets to create for this server which in turn control its
110
+	 * probability of it being selected. The probability is relative to the total weight
111
+	 * of all servers.
112
+	 */
113
+	private $_weight = 1;
114 114
 
115
-    private $_timeout = 360;
115
+	private $_timeout = 360;
116 116
 
117
-    private $_retryInterval = 15;
117
+	private $_retryInterval = 15;
118 118
 	/**
119
-	* @var integer Controls the minimum value length before attempting to compress automatically.
120
-	*/
121
-    private $_threshold=0;
119
+	 * @var integer Controls the minimum value length before attempting to compress automatically.
120
+	 */
121
+	private $_threshold=0;
122 122
 
123 123
 	/**
124
-	* @var float Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.
125
-	*/
126
-    private $_minSavings=0.0;
124
+	 * @var float Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.
125
+	 */
126
+	private $_minSavings=0.0;
127 127
 
128
-    private $_status = true;
128
+	private $_status = true;
129 129
 
130
-    private $_failureCallback = null;
130
+	private $_failureCallback = null;
131 131
 
132 132
 	/**
133 133
 	 * @var boolean whether to use memcached or memcache as the underlying caching extension.
@@ -171,63 +171,63 @@  discard block
 block discarded – undo
171 171
 		$this->_cache = $this->_useMemcached ? new Memcached : new Memcache;
172 172
 		$this->loadConfig($config);
173 173
 		if(count($this->_servers))
174
-        {
175
-            foreach($this->_servers as $server)
176
-            {
177
-                Prado::trace('Adding server '.$server['Host'].' from serverlist', 'System.Caching.TMemCache');
178
-                if($this->_cache->addServer($server['Host'],$server['Port'],$server['Persistent'],
179
-                    $server['Weight'],$server['Timeout'],$server['RetryInterval'])===false)
180
-                    throw new TConfigurationException('memcache_connection_failed',$server['Host'],$server['Port']);
181
-            }
182
-        }
183
-        else
184
-        {
185
-            Prado::trace('Adding server '.$this->_host, 'System.Caching.TMemCache');
186
-            if($this->_cache->addServer($this->_host,$this->_port)===false)
187
-                throw new TConfigurationException('memcache_connection_failed',$this->_host,$this->_port);
188
-        }
174
+		{
175
+			foreach($this->_servers as $server)
176
+			{
177
+				Prado::trace('Adding server '.$server['Host'].' from serverlist', 'System.Caching.TMemCache');
178
+				if($this->_cache->addServer($server['Host'],$server['Port'],$server['Persistent'],
179
+					$server['Weight'],$server['Timeout'],$server['RetryInterval'])===false)
180
+					throw new TConfigurationException('memcache_connection_failed',$server['Host'],$server['Port']);
181
+			}
182
+		}
183
+		else
184
+		{
185
+			Prado::trace('Adding server '.$this->_host, 'System.Caching.TMemCache');
186
+			if($this->_cache->addServer($this->_host,$this->_port)===false)
187
+				throw new TConfigurationException('memcache_connection_failed',$this->_host,$this->_port);
188
+		}
189 189
 		if($this->_threshold!==0)
190
-            $this->_cache->setCompressThreshold($this->_threshold,$this->_minSavings);
190
+			$this->_cache->setCompressThreshold($this->_threshold,$this->_minSavings);
191 191
 		$this->_initialized=true;
192 192
 		parent::init($config);
193 193
 	}
194 194
 
195
-    /**
195
+	/**
196 196
 	 * Loads configuration from an XML element
197 197
 	 * @param TXmlElement configuration node
198 198
 	 * @throws TConfigurationException if log route class or type is not specified
199 199
 	 */
200 200
 	private function loadConfig($xml)
201 201
 	{
202
-	    if($xml instanceof TXmlElement)
202
+		if($xml instanceof TXmlElement)
203 203
 		{
204
-    		foreach($xml->getElementsByTagName('server') as $serverConfig)
205
-    		{
206
-    			$properties=$serverConfig->getAttributes();
207
-    			if(($host=$properties->remove('Host'))===null)
208
-    				throw new TConfigurationException('memcache_serverhost_required');
209
-    			if(($port=$properties->remove('Port'))===null)
210
-        			throw new TConfigurationException('memcache_serverport_required');
211
-        		if(!is_numeric($port))
212
-        		    throw new TConfigurationException('memcache_serverport_invalid');
213
-        		$server = array('Host'=>$host,'Port'=>$port,'Weight'=>1,'Timeout'=>1800,'RetryInterval'=>15,'Persistent'=>true);
214
-        		$checks = array(
215
-        		    'Weight'=>'memcache_serverweight_invalid',
216
-        		    'Timeout'=>'memcache_servertimeout_invalid',
217
-        		    'RetryInterval'=>'memcach_serverretryinterval_invalid'
218
-        		);
219
-        		foreach($checks as $property=>$exception)
220
-        		{
221
-        		    $value=$properties->remove($property);
222
-        		    if($value!==null && is_numeric($value))
223
-        		        $server[$property]=$value;
224
-        		    else if($value!==null)
225
-        		        throw new TConfigurationException($exception);
226
-        		}
227
-        		$server['Persistent']= TPropertyValue::ensureBoolean($properties->remove('Persistent'));
228
-    			$this->_servers[]=$server;
229
-    		}
230
-	    }
204
+			foreach($xml->getElementsByTagName('server') as $serverConfig)
205
+			{
206
+				$properties=$serverConfig->getAttributes();
207
+				if(($host=$properties->remove('Host'))===null)
208
+					throw new TConfigurationException('memcache_serverhost_required');
209
+				if(($port=$properties->remove('Port'))===null)
210
+					throw new TConfigurationException('memcache_serverport_required');
211
+				if(!is_numeric($port))
212
+					throw new TConfigurationException('memcache_serverport_invalid');
213
+				$server = array('Host'=>$host,'Port'=>$port,'Weight'=>1,'Timeout'=>1800,'RetryInterval'=>15,'Persistent'=>true);
214
+				$checks = array(
215
+					'Weight'=>'memcache_serverweight_invalid',
216
+					'Timeout'=>'memcache_servertimeout_invalid',
217
+					'RetryInterval'=>'memcach_serverretryinterval_invalid'
218
+				);
219
+				foreach($checks as $property=>$exception)
220
+				{
221
+					$value=$properties->remove($property);
222
+					if($value!==null && is_numeric($value))
223
+						$server[$property]=$value;
224
+					else if($value!==null)
225
+						throw new TConfigurationException($exception);
226
+				}
227
+				$server['Persistent']= TPropertyValue::ensureBoolean($properties->remove('Persistent'));
228
+				$this->_servers[]=$server;
229
+			}
230
+		}
231 231
 	}
232 232
 
233 233
 	/**
Please login to merge, or discard this patch.
framework/Web/Javascripts/JSMin.php 1 patch
Indentation   +198 added lines, -198 removed lines patch added patch discarded remove patch
@@ -60,229 +60,229 @@
 block discarded – undo
60 60
   // -- Public Static Methods --------------------------------------------------
61 61
 
62 62
   public static function minify($js) {
63
-    $jsmin = new JSMin($js);
64
-    return $jsmin->min();
63
+	$jsmin = new JSMin($js);
64
+	return $jsmin->min();
65 65
   }
66 66
 
67 67
   // -- Public Instance Methods ------------------------------------------------
68 68
 
69 69
   public function __construct($input) {
70
-    $this->input       = str_replace("\r\n", "\n", $input);
71
-    $this->inputLength = strlen($this->input);
70
+	$this->input       = str_replace("\r\n", "\n", $input);
71
+	$this->inputLength = strlen($this->input);
72 72
   }
73 73
 
74 74
   // -- Protected Instance Methods ---------------------------------------------
75 75
 
76 76
   protected function action($d) {
77
-    switch($d) {
78
-      case 1:
79
-        $this->output .= $this->a;
80
-
81
-      case 2:
82
-        $this->a = $this->b;
83
-
84
-        if ($this->a === "'" || $this->a === '"') {
85
-          for (;;) {
86
-            $this->output .= $this->a;
87
-            $this->a       = $this->get();
88
-
89
-            if ($this->a === $this->b) {
90
-              break;
91
-            }
92
-
93
-            if (ord($this->a) <= self::ORD_LF) {
94
-              throw new JSMinException('Unterminated string literal.');
95
-            }
96
-
97
-            if ($this->a === '\\') {
98
-              $this->output .= $this->a;
99
-              $this->a       = $this->get();
100
-            }
101
-          }
102
-        }
103
-
104
-      case 3:
105
-        $this->b = $this->next();
106
-
107
-        if ($this->b === '/' && (
108
-            $this->a === '(' || $this->a === ',' || $this->a === '=' ||
109
-            $this->a === ':' || $this->a === '[' || $this->a === '!' ||
110
-            $this->a === '&' || $this->a === '|' || $this->a === '?')) {
111
-
112
-          $this->output .= $this->a . $this->b;
113
-
114
-          for (;;) {
115
-            $this->a = $this->get();
116
-
117
-            if ($this->a === '/') {
118
-              break;
119
-            } elseif ($this->a === '\\') {
120
-              $this->output .= $this->a;
121
-              $this->a       = $this->get();
122
-            } elseif (ord($this->a) <= self::ORD_LF) {
123
-              throw new JSMinException('Unterminated regular expression '.
124
-                  'literal.');
125
-            }
126
-
127
-            $this->output .= $this->a;
128
-          }
129
-
130
-          $this->b = $this->next();
131
-        }
132
-    }
77
+	switch($d) {
78
+	  case 1:
79
+		$this->output .= $this->a;
80
+
81
+	  case 2:
82
+		$this->a = $this->b;
83
+
84
+		if ($this->a === "'" || $this->a === '"') {
85
+		  for (;;) {
86
+			$this->output .= $this->a;
87
+			$this->a       = $this->get();
88
+
89
+			if ($this->a === $this->b) {
90
+			  break;
91
+			}
92
+
93
+			if (ord($this->a) <= self::ORD_LF) {
94
+			  throw new JSMinException('Unterminated string literal.');
95
+			}
96
+
97
+			if ($this->a === '\\') {
98
+			  $this->output .= $this->a;
99
+			  $this->a       = $this->get();
100
+			}
101
+		  }
102
+		}
103
+
104
+	  case 3:
105
+		$this->b = $this->next();
106
+
107
+		if ($this->b === '/' && (
108
+			$this->a === '(' || $this->a === ',' || $this->a === '=' ||
109
+			$this->a === ':' || $this->a === '[' || $this->a === '!' ||
110
+			$this->a === '&' || $this->a === '|' || $this->a === '?')) {
111
+
112
+		  $this->output .= $this->a . $this->b;
113
+
114
+		  for (;;) {
115
+			$this->a = $this->get();
116
+
117
+			if ($this->a === '/') {
118
+			  break;
119
+			} elseif ($this->a === '\\') {
120
+			  $this->output .= $this->a;
121
+			  $this->a       = $this->get();
122
+			} elseif (ord($this->a) <= self::ORD_LF) {
123
+			  throw new JSMinException('Unterminated regular expression '.
124
+				  'literal.');
125
+			}
126
+
127
+			$this->output .= $this->a;
128
+		  }
129
+
130
+		  $this->b = $this->next();
131
+		}
132
+	}
133 133
   }
134 134
 
135 135
   protected function get() {
136
-    $c = $this->lookAhead;
137
-    $this->lookAhead = null;
138
-
139
-    if ($c === null) {
140
-      if ($this->inputIndex < $this->inputLength) {
141
-        $c = $this->input[$this->inputIndex];
142
-        $this->inputIndex += 1;
143
-      } else {
144
-        $c = null;
145
-      }
146
-    }
147
-
148
-    if ($c === "\r") {
149
-      return "\n";
150
-    }
151
-
152
-    if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) {
153
-      return $c;
154
-    }
155
-
156
-    return ' ';
136
+	$c = $this->lookAhead;
137
+	$this->lookAhead = null;
138
+
139
+	if ($c === null) {
140
+	  if ($this->inputIndex < $this->inputLength) {
141
+		$c = $this->input[$this->inputIndex];
142
+		$this->inputIndex += 1;
143
+	  } else {
144
+		$c = null;
145
+	  }
146
+	}
147
+
148
+	if ($c === "\r") {
149
+	  return "\n";
150
+	}
151
+
152
+	if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) {
153
+	  return $c;
154
+	}
155
+
156
+	return ' ';
157 157
   }
158 158
 
159 159
   protected function isAlphaNum($c) {
160
-    return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1;
160
+	return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1;
161 161
   }
162 162
 
163 163
   protected function min() {
164
-    $this->a = "\n";
165
-    $this->action(3);
166
-
167
-    while ($this->a !== null) {
168
-      switch ($this->a) {
169
-        case ' ':
170
-          if ($this->isAlphaNum($this->b)) {
171
-            $this->action(1);
172
-          } else {
173
-            $this->action(2);
174
-          }
175
-          break;
176
-
177
-        case "\n":
178
-          switch ($this->b) {
179
-            case '{':
180
-            case '[':
181
-            case '(':
182
-            case '+':
183
-            case '-':
184
-              $this->action(1);
185
-              break;
186
-
187
-            case ' ':
188
-              $this->action(3);
189
-              break;
190
-
191
-            default:
192
-              if ($this->isAlphaNum($this->b)) {
193
-                $this->action(1);
194
-              }
195
-              else {
196
-                $this->action(2);
197
-              }
198
-          }
199
-          break;
200
-
201
-        default:
202
-          switch ($this->b) {
203
-            case ' ':
204
-              if ($this->isAlphaNum($this->a)) {
205
-                $this->action(1);
206
-                break;
207
-              }
208
-
209
-              $this->action(3);
210
-              break;
211
-
212
-            case "\n":
213
-              switch ($this->a) {
214
-                case '}':
215
-                case ']':
216
-                case ')':
217
-                case '+':
218
-                case '-':
219
-                case '"':
220
-                case "'":
221
-                  $this->action(1);
222
-                  break;
223
-
224
-                default:
225
-                  if ($this->isAlphaNum($this->a)) {
226
-                    $this->action(1);
227
-                  }
228
-                  else {
229
-                    $this->action(3);
230
-                  }
231
-              }
232
-              break;
233
-
234
-            default:
235
-              $this->action(1);
236
-              break;
237
-          }
238
-      }
239
-    }
240
-
241
-    return $this->output;
164
+	$this->a = "\n";
165
+	$this->action(3);
166
+
167
+	while ($this->a !== null) {
168
+	  switch ($this->a) {
169
+		case ' ':
170
+		  if ($this->isAlphaNum($this->b)) {
171
+			$this->action(1);
172
+		  } else {
173
+			$this->action(2);
174
+		  }
175
+		  break;
176
+
177
+		case "\n":
178
+		  switch ($this->b) {
179
+			case '{':
180
+			case '[':
181
+			case '(':
182
+			case '+':
183
+			case '-':
184
+			  $this->action(1);
185
+			  break;
186
+
187
+			case ' ':
188
+			  $this->action(3);
189
+			  break;
190
+
191
+			default:
192
+			  if ($this->isAlphaNum($this->b)) {
193
+				$this->action(1);
194
+			  }
195
+			  else {
196
+				$this->action(2);
197
+			  }
198
+		  }
199
+		  break;
200
+
201
+		default:
202
+		  switch ($this->b) {
203
+			case ' ':
204
+			  if ($this->isAlphaNum($this->a)) {
205
+				$this->action(1);
206
+				break;
207
+			  }
208
+
209
+			  $this->action(3);
210
+			  break;
211
+
212
+			case "\n":
213
+			  switch ($this->a) {
214
+				case '}':
215
+				case ']':
216
+				case ')':
217
+				case '+':
218
+				case '-':
219
+				case '"':
220
+				case "'":
221
+				  $this->action(1);
222
+				  break;
223
+
224
+				default:
225
+				  if ($this->isAlphaNum($this->a)) {
226
+					$this->action(1);
227
+				  }
228
+				  else {
229
+					$this->action(3);
230
+				  }
231
+			  }
232
+			  break;
233
+
234
+			default:
235
+			  $this->action(1);
236
+			  break;
237
+		  }
238
+	  }
239
+	}
240
+
241
+	return $this->output;
242 242
   }
243 243
 
244 244
   protected function next() {
245
-    $c = $this->get();
246
-
247
-    if ($c === '/') {
248
-      switch($this->peek()) {
249
-        case '/':
250
-          for (;;) {
251
-            $c = $this->get();
252
-
253
-            if (ord($c) <= self::ORD_LF) {
254
-              return $c;
255
-            }
256
-          }
257
-
258
-        case '*':
259
-          $this->get();
260
-
261
-          for (;;) {
262
-            switch($this->get()) {
263
-              case '*':
264
-                if ($this->peek() === '/') {
265
-                  $this->get();
266
-                  return ' ';
267
-                }
268
-                break;
269
-
270
-              case null:
271
-                throw new JSMinException('Unterminated comment.');
272
-            }
273
-          }
274
-
275
-        default:
276
-          return $c;
277
-      }
278
-    }
279
-
280
-    return $c;
245
+	$c = $this->get();
246
+
247
+	if ($c === '/') {
248
+	  switch($this->peek()) {
249
+		case '/':
250
+		  for (;;) {
251
+			$c = $this->get();
252
+
253
+			if (ord($c) <= self::ORD_LF) {
254
+			  return $c;
255
+			}
256
+		  }
257
+
258
+		case '*':
259
+		  $this->get();
260
+
261
+		  for (;;) {
262
+			switch($this->get()) {
263
+			  case '*':
264
+				if ($this->peek() === '/') {
265
+				  $this->get();
266
+				  return ' ';
267
+				}
268
+				break;
269
+
270
+			  case null:
271
+				throw new JSMinException('Unterminated comment.');
272
+			}
273
+		  }
274
+
275
+		default:
276
+		  return $c;
277
+	  }
278
+	}
279
+
280
+	return $c;
281 281
   }
282 282
 
283 283
   protected function peek() {
284
-    $this->lookAhead = $this->get();
285
-    return $this->lookAhead;
284
+	$this->lookAhead = $this->get();
285
+	return $this->lookAhead;
286 286
   }
287 287
 }
288 288
 
Please login to merge, or discard this patch.
framework/Web/Services/TFeedService.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,9 +139,9 @@
 block discarded – undo
139 139
 			$feed->init($feedConfig);
140 140
 
141 141
 			$content=$feed->getFeedContent();
142
-		    //$this->getResponse()->setContentType('application/rss+xml');
143
-		    $this->getResponse()->setContentType($feed->getContentType());
144
-		    $this->getResponse()->write($content);
142
+			//$this->getResponse()->setContentType('application/rss+xml');
143
+			$this->getResponse()->setContentType($feed->getContentType());
144
+			$this->getResponse()->write($content);
145 145
 		}
146 146
 		else
147 147
 			throw new THttpException(404,'feedservice_feed_unknown',$id);
Please login to merge, or discard this patch.
framework/Web/UI/TCachePageStatePersister.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,15 +144,15 @@
 block discarded – undo
144 144
 	 */
145 145
 	public function getKeyPrefix()
146 146
 	{
147
-	    return $this->_prefix;
147
+		return $this->_prefix;
148 148
 	}
149 149
 
150 150
 	/**
151
-     * @param string prefix of cache variable name to avoid conflict with other cache data
152
-     */
151
+	 * @param string prefix of cache variable name to avoid conflict with other cache data
152
+	 */
153 153
 	public function setKeyPrefix($value)
154 154
 	{
155
-	    $this->_prefix=$value;
155
+		$this->_prefix=$value;
156 156
 	}
157 157
 
158 158
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TListControl.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -334,8 +334,8 @@  discard block
 block discarded – undo
334 334
 
335 335
 	/**
336 336
 	 * @return boolean a value indicating whether an automatic postback to the server
337
-     * will occur whenever the user makes change to the list control and then tabs out of it.
338
-     * Defaults to false.
337
+	 * will occur whenever the user makes change to the list control and then tabs out of it.
338
+	 * Defaults to false.
339 339
 	 */
340 340
 	public function getAutoPostBack()
341 341
 	{
@@ -591,23 +591,23 @@  discard block
 block discarded – undo
591 591
 	 * @param string the value of the item to be selected.
592 592
 	 */
593 593
 	public function setSelectedValue($value)
594
-    {
595
-	    if($this->_items)
596
-	    {
597
-		    if($value===null)
598
-		    	$this->clearSelection();
599
-		    else if(($item=$this->_items->findItemByValue($value))!==null)
600
-	    	{
601
-		    	$this->clearSelection();
602
-		    	$item->setSelected(true);
603
-	    	}
604
-	    	else
594
+	{
595
+		if($this->_items)
596
+		{
597
+			if($value===null)
598
+				$this->clearSelection();
599
+			else if(($item=$this->_items->findItemByValue($value))!==null)
600
+			{
601
+				$this->clearSelection();
602
+				$item->setSelected(true);
603
+			}
604
+			else
605 605
 				$this->clearSelection();
606
-    	}
607
-    	$this->_cachedSelectedValue=$value;
606
+		}
607
+		$this->_cachedSelectedValue=$value;
608 608
 		if($this->getAdapter() instanceof IListControlAdapter)
609 609
 			$this->getAdapter()->setSelectedValue($value);
610
-    }
610
+	}
611 611
 
612 612
 
613 613
 	/**
@@ -655,36 +655,36 @@  discard block
 block discarded – undo
655 655
 			$this->getAdapter()->setSelectedValues($values);
656 656
 	}
657 657
 
658
-    /**
659
-     * @return string selected value
660
-     */
661
-    public function getText()
662
-    {
663
-	    return $this->getSelectedValue();
664
-    }
665
-
666
-    /**
667
-     * @param string value to be selected
668
-     */
669
-    public function setText($value)
670
-    {
671
-	    $this->setSelectedValue($value);
672
-    }
673
-
674
-    /**
675
-     * Clears all existing selections.
676
-     */
677
-    public function clearSelection()
678
-    {
679
-	    if($this->_items)
680
-	    {
681
-		    foreach($this->_items as $item)
682
-		    	$item->setSelected(false);
683
-	    }
658
+	/**
659
+	 * @return string selected value
660
+	 */
661
+	public function getText()
662
+	{
663
+		return $this->getSelectedValue();
664
+	}
665
+
666
+	/**
667
+	 * @param string value to be selected
668
+	 */
669
+	public function setText($value)
670
+	{
671
+		$this->setSelectedValue($value);
672
+	}
673
+
674
+	/**
675
+	 * Clears all existing selections.
676
+	 */
677
+	public function clearSelection()
678
+	{
679
+		if($this->_items)
680
+		{
681
+			foreach($this->_items as $item)
682
+				$item->setSelected(false);
683
+		}
684 684
 
685 685
 		if($this->getAdapter() instanceof IListControlAdapter)
686 686
 			$this->getAdapter()->clearSelection();
687
-    }
687
+	}
688 688
 
689 689
 	/**
690 690
 	 * @return string the group of validators which the list control causes validation upon postback
@@ -914,10 +914,10 @@  discard block
 block discarded – undo
914 914
 	 */
915 915
 	public function setSelectedValues($values);
916 916
 
917
-    /**
918
-     * Clears all existing selections on the client side.
919
-     */
920
-    public function clearSelection();
917
+	/**
918
+	 * Clears all existing selections on the client side.
919
+	 */
920
+	public function clearSelection();
921 921
 }
922 922
 
923 923
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TAccordion.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -180,24 +180,24 @@  discard block
 block discarded – undo
180 180
 	}
181 181
 
182 182
 	/**
183
-	* @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
184
-	*/
183
+	 * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
184
+	 */
185 185
 	public function getCssUrl()
186 186
 	{
187 187
 		return $this->getViewState('CssUrl','default');
188 188
 	}
189 189
 
190 190
 	/**
191
-	* @param string URL for the CSS file including all relevant CSS class definitions.
192
-	*/
191
+	 * @param string URL for the CSS file including all relevant CSS class definitions.
192
+	 */
193 193
 	public function setCssUrl($value)
194 194
 	{
195 195
 		$this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
196 196
 	}
197 197
 
198 198
 	/**
199
-		* @return string CSS class for the whole accordion control div.
200
-	*/
199
+	 * @return string CSS class for the whole accordion control div.
200
+	 */
201 201
 	public function getCssClass()
202 202
 	{
203 203
 		$cssClass=parent::getCssClass();
@@ -205,32 +205,32 @@  discard block
 block discarded – undo
205 205
 	}
206 206
 
207 207
 	/**
208
-		* @return string CSS class for the currently displayed view div. Defaults to 'accordion-view'.
209
-	*/
208
+	 * @return string CSS class for the currently displayed view div. Defaults to 'accordion-view'.
209
+	 */
210 210
 	public function getViewCssClass()
211 211
 	{
212 212
 		return $this->getViewStyle()->getCssClass();
213 213
 	}
214 214
 
215 215
 	/**
216
-	* @param string CSS class for the currently displayed view div.
217
-	*/
216
+	 * @param string CSS class for the currently displayed view div.
217
+	 */
218 218
 	public function setViewCssClass($value)
219 219
 	{
220 220
 		$this->getViewStyle()->setCssClass($value);
221 221
 	}
222 222
 
223 223
 	/**
224
-		* @return string CSS class for the currently displayed view div. Defaults to 'accordion-view'.
225
-	*/
224
+	 * @return string CSS class for the currently displayed view div. Defaults to 'accordion-view'.
225
+	 */
226 226
 	public function getAnimationDuration()
227 227
 	{
228 228
 		return $this->getViewState('AnimationDuration','1');
229 229
 	}
230 230
 
231 231
 	/**
232
-	* @param string CSS class for the currently displayed view div.
233
-	*/
232
+	 * @param string CSS class for the currently displayed view div.
233
+	 */
234 234
 	public function setAnimationDuration($value)
235 235
 	{
236 236
 		$this->setViewState('AnimationDuration',$value);
Please login to merge, or discard this patch.