Skip to content

Commit

Permalink
Remove aligned '=>' and '='
Browse files Browse the repository at this point in the history
  • Loading branch information
polc authored and fabpot committed Oct 26, 2014
1 parent 74c7ed7 commit bd05f48
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 103 deletions.
10 changes: 5 additions & 5 deletions File/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ public static function getMaxFilesize()
private function getErrorMessage($errorCode)
{
static $errors = array(
UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).',
UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.',
UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.',
UPLOAD_ERR_NO_FILE => 'No file was uploaded.',
UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).',
UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.',
UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.',
UPLOAD_ERR_NO_FILE => 'No file was uploaded.',
UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.',
UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',
UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',
UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',
);

$maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0;
Expand Down
8 changes: 4 additions & 4 deletions FileBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ protected function fixPhpFilesArray($data)

foreach (array_keys($data['name']) as $key) {
$files[$key] = $this->fixPhpFilesArray(array(
'error' => $data['error'][$key],
'name' => $data['name'][$key],
'type' => $data['type'][$key],
'error' => $data['error'][$key],
'name' => $data['name'][$key],
'type' => $data['type'][$key],
'tmp_name' => $data['tmp_name'][$key],
'size' => $data['size'][$key],
'size' => $data['size'][$key],
));
}

Expand Down
74 changes: 37 additions & 37 deletions Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
*/
class Request
{
const HEADER_CLIENT_IP = 'client_ip';
const HEADER_CLIENT_HOST = 'client_host';
const HEADER_CLIENT_IP = 'client_ip';
const HEADER_CLIENT_HOST = 'client_host';
const HEADER_CLIENT_PROTO = 'client_proto';
const HEADER_CLIENT_PORT = 'client_port';
const HEADER_CLIENT_PORT = 'client_port';

protected static $trustedProxies = array();

Expand All @@ -55,10 +55,10 @@ class Request
* by popular reverse proxies (like Apache mod_proxy or Amazon EC2).
*/
protected static $trustedHeaders = array(
self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO',
self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
);

protected static $httpMethodParameterOverride = false;
Expand Down Expand Up @@ -293,18 +293,18 @@ public static function createFromGlobals()
public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null)
{
$server = array_replace(array(
'SERVER_NAME' => 'localhost',
'SERVER_PORT' => 80,
'HTTP_HOST' => 'localhost',
'HTTP_USER_AGENT' => 'Symfony/2.X',
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'SERVER_NAME' => 'localhost',
'SERVER_PORT' => 80,
'HTTP_HOST' => 'localhost',
'HTTP_USER_AGENT' => 'Symfony/2.X',
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'REMOTE_ADDR' => '127.0.0.1',
'SCRIPT_NAME' => '',
'SCRIPT_FILENAME' => '',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'REQUEST_TIME' => time(),
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'REMOTE_ADDR' => '127.0.0.1',
'SCRIPT_NAME' => '',
'SCRIPT_FILENAME' => '',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'REQUEST_TIME' => time(),
), $server);

$server['PATH_INFO'] = '';
Expand Down Expand Up @@ -447,13 +447,13 @@ public function duplicate(array $query = null, array $request = null, array $att
*/
public function __clone()
{
$this->query = clone $this->query;
$this->request = clone $this->request;
$this->query = clone $this->query;
$this->request = clone $this->request;
$this->attributes = clone $this->attributes;
$this->cookies = clone $this->cookies;
$this->files = clone $this->files;
$this->server = clone $this->server;
$this->headers = clone $this->headers;
$this->cookies = clone $this->cookies;
$this->files = clone $this->files;
$this->server = clone $this->server;
$this->headers = clone $this->headers;
}

/**
Expand Down Expand Up @@ -1000,7 +1000,7 @@ public function getUserInfo()
public function getHttpHost()
{
$scheme = $this->getScheme();
$port = $this->getPort();
$port = $this->getPort();

if (('http' == $scheme && $port == 80) || ('https' == $scheme && $port == 443)) {
return $this->getHost();
Expand Down Expand Up @@ -1656,15 +1656,15 @@ protected function prepareBaseUrl()
} else {
// Backtrack up the script_filename to find the portion matching
// php_self
$path = $this->server->get('PHP_SELF', '');
$file = $this->server->get('SCRIPT_FILENAME', '');
$segs = explode('/', trim($file, '/'));
$segs = array_reverse($segs);
$index = 0;
$last = count($segs);
$path = $this->server->get('PHP_SELF', '');
$file = $this->server->get('SCRIPT_FILENAME', '');
$segs = explode('/', trim($file, '/'));
$segs = array_reverse($segs);
$index = 0;
$last = count($segs);
$baseUrl = '';
do {
$seg = $segs[$index];
$seg = $segs[$index];
$baseUrl = '/'.$seg.$baseUrl;
++$index;
} while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos);
Expand Down Expand Up @@ -1767,14 +1767,14 @@ protected static function initializeFormats()
{
static::$formats = array(
'html' => array('text/html', 'application/xhtml+xml'),
'txt' => array('text/plain'),
'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
'css' => array('text/css'),
'txt' => array('text/plain'),
'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
'css' => array('text/css'),
'json' => array('application/json', 'application/x-json'),
'xml' => array('text/xml', 'application/xml', 'application/x-xml'),
'rdf' => array('application/rdf+xml'),
'xml' => array('text/xml', 'application/xml', 'application/x-xml'),
'rdf' => array('application/rdf+xml'),
'atom' => array('application/atom+xml'),
'rss' => array('application/rss+xml'),
'rss' => array('application/rss+xml'),
);
}

Expand Down
4 changes: 2 additions & 2 deletions Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,8 @@ public function isNotModified(Request $request)
return false;
}

$notModified = false;
$lastModified = $this->headers->get('Last-Modified');
$notModified = false;
$lastModified = $this->headers->get('Last-Modified');
$modifiedSince = $request->headers->get('If-Modified-Since');

if ($etags = $request->getEtags()) {
Expand Down
10 changes: 5 additions & 5 deletions ResponseHeaderBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
*/
class ResponseHeaderBag extends HeaderBag
{
const COOKIES_FLAT = 'flat';
const COOKIES_ARRAY = 'array';
const COOKIES_FLAT = 'flat';
const COOKIES_ARRAY = 'array';

const DISPOSITION_ATTACHMENT = 'attachment';
const DISPOSITION_INLINE = 'inline';
const DISPOSITION_INLINE = 'inline';

/**
* @var array
Expand All @@ -34,12 +34,12 @@ class ResponseHeaderBag extends HeaderBag
/**
* @var array
*/
protected $cookies = array();
protected $cookies = array();

/**
* @var array
*/
protected $headerNames = array();
protected $headerNames = array();

/**
* Constructor.
Expand Down
2 changes: 1 addition & 1 deletion Session/Storage/Handler/MongoDbSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct($mongo, array $options)
$this->mongo = $mongo;

$this->options = array_merge(array(
'id_field' => '_id',
'id_field' => '_id',
'data_field' => 'data',
'time_field' => 'time',
), $options);
Expand Down
2 changes: 1 addition & 1 deletion Session/Storage/Handler/PdoSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct(\PDO $pdo, array $dbOptions = array())
}
$this->pdo = $pdo;
$dbOptions = array_merge(array(
'db_id_col' => 'sess_id',
'db_id_col' => 'sess_id',
'db_data_col' => 'sess_data',
'db_time_col' => 'sess_time',
), $dbOptions);
Expand Down
4 changes: 2 additions & 2 deletions Tests/ApacheRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function provideServerVars()
array(
'REQUEST_URI' => '/foo/app_dev.php/bar',
'SCRIPT_NAME' => '/foo/app_dev.php',
'PATH_INFO' => '/bar',
'PATH_INFO' => '/bar',
),
'/foo/app_dev.php/bar',
'/foo/app_dev.php',
Expand All @@ -54,7 +54,7 @@ public function provideServerVars()
array(
'REQUEST_URI' => '/app_dev.php/foo/bar',
'SCRIPT_NAME' => '/app_dev.php',
'PATH_INFO' => '/foo/bar',
'PATH_INFO' => '/foo/bar',
),
'/app_dev.php/foo/bar',
'/app_dev.php',
Expand Down
4 changes: 2 additions & 2 deletions Tests/HeaderBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function testCacheControlDirectiveOverrideWithReplace()
*/
public function testGetIterator()
{
$headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm');
$headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm');
$headerBag = new HeaderBag($headers);

$i = 0;
Expand All @@ -208,7 +208,7 @@ public function testGetIterator()
*/
public function testCount()
{
$headers = array('foo' => 'bar', 'HELLO' => 'WORLD');
$headers = array('foo' => 'bar', 'HELLO' => 'WORLD');
$headerBag = new HeaderBag($headers);

$this->assertEquals(count($headers), count($headerBag));
Expand Down
4 changes: 2 additions & 2 deletions Tests/ParameterBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ public function testFilter()
$this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path');

$this->assertFalse($bag->filter('dec', '', false, FILTER_VALIDATE_INT, array(
'flags' => FILTER_FLAG_ALLOW_HEX,
'flags' => FILTER_FLAG_ALLOW_HEX,
'options' => array('min_range' => 1, 'max_range' => 0xff),)
), '->filter() gets a value of parameter as integer between boundaries');

$this->assertFalse($bag->filter('hex', '', false, FILTER_VALIDATE_INT, array(
'flags' => FILTER_FLAG_ALLOW_HEX,
'flags' => FILTER_FLAG_ALLOW_HEX,
'options' => array('min_range' => 1, 'max_range' => 0xff),)
), '->filter() gets a value of parameter as integer between boundaries');

Expand Down
Loading

0 comments on commit bd05f48

Please sign in to comment.