Permalink
Browse files

fixed CS

  • Loading branch information...
1 parent 67f5684 commit 985f3aa6c9f8074b2d1a12345e0768f8c24aa72d @fabpot fabpot committed Jul 9, 2012
@@ -33,7 +33,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface
*
* @var ExtensionGuesser
*/
- static private $instance = null;
+ private static $instance = null;
/**
* All registered ExtensionGuesserInterface instances
@@ -47,7 +47,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface
*
* @return ExtensionGuesser
*/
- static public function getInstance()
+ public static function getInstance()
{
if (null === self::$instance) {
self::$instance = new self();
@@ -22,5 +22,5 @@
* @param string $mimeType The mime type
* @return string The guessed extension or NULL, if none could be guessed
*/
- function guess($mimeType);
+ public function guess($mimeType);
}
@@ -43,7 +43,7 @@ public function __construct($cmd = 'file -b --mime %s 2>/dev/null')
*
* @return Boolean
*/
- static public function isSupported()
+ public static function isSupported()
{
return !defined('PHP_WINDOWS_VERSION_BUILD');
}
@@ -26,7 +26,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface
*
* @return Boolean
*/
- static public function isSupported()
+ public static function isSupported()
{
return function_exists('finfo_open');
}
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\File\Mimetype;
+namespace Symfony\Component\HttpFoundation\File\MimeType;
/**
* Provides a best-guess mapping of mime type to file extension.
@@ -38,7 +38,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface
*
* @var MimeTypeGuesser
*/
- static private $instance = null;
+ private static $instance = null;
/**
* All registered MimeTypeGuesserInterface instances
@@ -52,7 +52,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface
*
* @return MimeTypeGuesser
*/
- static public function getInstance()
+ public static function getInstance()
{
if (null === self::$instance) {
self::$instance = new self();
@@ -31,5 +31,5 @@
* @throws FileNotFoundException If the file does not exist
* @throws AccessDeniedException If the file could not be read
*/
- function guess($path);
+ public function guess($path);
}
View
@@ -201,7 +201,7 @@ public function move($directory, $name = null)
*
* @return int The maximum size of an uploaded file in bytes
*/
- static public function getMaxFilesize()
+ public static function getMaxFilesize()
{
$max = trim(ini_get('upload_max_filesize'));
View
@@ -23,7 +23,7 @@
*/
class FileBag extends ParameterBag
{
- static private $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
+ private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
/**
* Constructor.
View
@@ -38,7 +38,7 @@ public function __construct($data = array(), $status = 200, $headers = array())
/**
* {@inheritDoc}
*/
- static public function create($data = array(), $status = 200, $headers = array())
+ public static function create($data = array(), $status = 200, $headers = array())
{
return new static($data, $status, $headers);
}
View
@@ -66,7 +66,7 @@ public function __construct($url, $status = 302, $headers = array())
/**
* {@inheritDoc}
*/
- static public function create($url = '', $status = 302, $headers = array())
+ public static function create($url = '', $status = 302, $headers = array())
{
return new static($url, $status, $headers);
}
View
@@ -30,7 +30,7 @@
*/
class Request
{
- static protected $trustProxy = false;
+ protected static $trustProxy = false;
/**
* @var \Symfony\Component\HttpFoundation\ParameterBag
@@ -149,7 +149,7 @@ class Request
/**
* @var array
*/
- static protected $formats;
+ protected static $formats;
/**
* Constructor.
@@ -213,7 +213,7 @@ public function initialize(array $query = array(), array $request = array(), arr
*
* @api
*/
- static public function createFromGlobals()
+ public static function createFromGlobals()
{
$request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
@@ -242,7 +242,7 @@ static public function createFromGlobals()
*
* @api
*/
- static public function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null)
+ public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null)
{
$defaults = array(
'SERVER_NAME' => 'localhost',
@@ -444,7 +444,7 @@ public function overrideGlobals()
*
* @api
*/
- static public function trustProxyData()
+ public static function trustProxyData()
{
self::$trustProxy = true;
}
@@ -455,7 +455,7 @@ static public function trustProxyData()
*
* @return boolean
*/
- static public function isProxyTrusted()
+ public static function isProxyTrusted()
{
return self::$trustProxy;
}
@@ -470,7 +470,7 @@ static public function isProxyTrusted()
*
* @return string A normalized query string for the Request
*/
- static public function normalizeQueryString($qs)
+ public static function normalizeQueryString($qs)
{
if ('' == $qs) {
return '';
@@ -848,6 +848,7 @@ public function getUriForPath($path)
public function getQueryString()
{
$qs = static::normalizeQueryString($this->server->get('QUERY_STRING'));
+
return '' === $qs ? null : $qs;
}
@@ -1454,7 +1455,7 @@ protected function preparePathInfo()
/**
* Initializes HTTP request formats.
*/
- static protected function initializeFormats()
+ protected static function initializeFormats()
{
static::$formats = array(
'html' => array('text/html', 'application/xhtml+xml'),
@@ -29,5 +29,5 @@
*
* @api
*/
- function matches(Request $request);
+ public function matches(Request $request);
}
@@ -36,7 +36,7 @@
*
* @return boolean
*/
- function open($savePath, $sessionName);
+ public function open($savePath, $sessionName);
/**
* Close session.
@@ -45,7 +45,7 @@ function open($savePath, $sessionName);
*
* @return boolean
*/
- function close();
+ public function close();
/**
* Read session.
@@ -56,7 +56,7 @@ function close();
*
* @return string String as stored in persistent storage or empty string in all other cases.
*/
- function read($sessionId);
+ public function read($sessionId);
/**
* Commit session to storage.
@@ -68,7 +68,7 @@ function read($sessionId);
*
* @return boolean
*/
- function write($sessionId, $data);
+ public function write($sessionId, $data);
/**
* Destroys this session.
@@ -81,7 +81,7 @@ function write($sessionId, $data);
*
* @return boolean
*/
- function destroy($sessionId);
+ public function destroy($sessionId);
/**
* Garbage collection for storage.
@@ -94,5 +94,5 @@ function destroy($sessionId);
*
* @return boolean
*/
- function gc($lifetime);
+ public function gc($lifetime);
}
View
@@ -61,7 +61,7 @@ class Response
*
* @var array
*/
- static public $statusTexts = array(
+ public static $statusTexts = array(
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing', // RFC2518
@@ -158,7 +158,7 @@ public function __construct($content = '', $status = 200, $headers = array())
*
* @return Response
*/
- static public function create($content = '', $status = 200, $headers = array())
+ public static function create($content = '', $status = 200, $headers = array())
{
return new static($content, $status, $headers);
}
@@ -27,7 +27,7 @@
*
* @return Boolean true if the attribute is defined, false otherwise
*/
- function has($name);
+ public function has($name);
/**
* Returns an attribute.
@@ -37,29 +37,29 @@ function has($name);
*
* @return mixed
*/
- function get($name, $default = null);
+ public function get($name, $default = null);
/**
* Sets an attribute.
*
* @param string $name
* @param mixed $value
*/
- function set($name, $value);
+ public function set($name, $value);
/**
* Returns attributes.
*
* @return array Attributes
*/
- function all();
+ public function all();
/**
* Sets attributes.
*
* @param array $attributes Attributes
*/
- function replace(array $attributes);
+ public function replace(array $attributes);
/**
* Removes an attribute.
@@ -68,5 +68,5 @@ function replace(array $attributes);
*
* @return mixed The removed value
*/
- function remove($name);
+ public function remove($name);
}
@@ -93,7 +93,7 @@ public function peek($type, array $default = array())
*/
public function peekAll()
{
- return array_key_exists('display', $this->flashes) ? (array)$this->flashes['display'] : array();
+ return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array();
}
/**
@@ -139,7 +139,7 @@ public function setAll(array $messages)
*/
public function set($type, $messages)
{
- $this->flashes['new'][$type] = (array)$messages;
+ $this->flashes['new'][$type] = (array) $messages;
}
/**
Oops, something went wrong.

0 comments on commit 985f3aa

Please sign in to comment.