Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
[PSR-2] fixers=braces,elseif,short_tag,php_closing_tag,trailing_space…
Browse files Browse the repository at this point in the history
…s,linefeed

Applied php-cs-fixer --fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed
  • Loading branch information
Maks3w committed Jul 12, 2012
1 parent 284b50c commit 65e3b0b
Show file tree
Hide file tree
Showing 69 changed files with 177 additions and 175 deletions.
2 changes: 1 addition & 1 deletion src/Client/Adapter/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @category Zend
* @package Zend_Application
*/
class InvalidArgumentException extends Exception\InvalidArgumentException implements
class InvalidArgumentException extends Exception\InvalidArgumentException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Adapter/Exception/OutOfRangeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @category Zend
* @package Zend_Application
*/
class OutOfRangeException extends Exception\OutOfRangeException implements
class OutOfRangeException extends Exception\OutOfRangeException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Adapter/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @category Zend
* @package Zend_Application
*/
class RuntimeException extends Exception\RuntimeException implements
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{}
3 changes: 2 additions & 1 deletion src/Client/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
* @param int $ret_as What value to return
* @return array|string
*/
protected function _flattenCookiesArray($ptr, $ret_as = self::COOKIE_OBJECT) {
protected function _flattenCookiesArray($ptr, $ret_as = self::COOKIE_OBJECT)
{
if (is_array($ptr)) {
$ret = ($ret_as == self::COOKIE_STRING_CONCAT ? '' : array());
foreach ($ptr as $item) {
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @category Zend
* @package Zend_Application
*/
class InvalidArgumentException extends Exception\InvalidArgumentException implements
class InvalidArgumentException extends Exception\InvalidArgumentException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Exception/OutOfRangeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

use Zend\Http\Exception;

class OutOfRangeException extends Exception\OutOfRangeException implements
class OutOfRangeException extends Exception\OutOfRangeException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @category Zend
* @package Zend_Application
*/
class RuntimeException extends Exception\RuntimeException implements
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{}
3 changes: 2 additions & 1 deletion src/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
* @param int $ret_as What value to return
* @return array|string
*/
protected function _flattenCookiesArray($ptr, $ret_as = self::COOKIE_OBJECT) {
protected function _flattenCookiesArray($ptr, $ret_as = self::COOKIE_OBJECT)
{
if (is_array($ptr)) {
$ret = ($ret_as == self::COOKIE_STRING_CONCAT ? '' : array());
foreach ($ptr as $item) {
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Zend\Http\Exception;

class InvalidArgumentException extends \InvalidArgumentException implements
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Exception/OutOfRangeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

namespace Zend\Http\Exception;

class OutOfRangeException extends \OutOfRangeException implements
class OutOfRangeException extends \OutOfRangeException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Zend\Http\Exception;

class RuntimeException extends \RuntimeException implements
class RuntimeException extends \RuntimeException implements
ExceptionInterface
{
}
34 changes: 17 additions & 17 deletions src/Header/AbstractAccept.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ abstract class AbstractAccept implements HeaderInterface
protected $priorityQueue;
protected $types = array();

protected $regexAddType;
protected $regexAddType;

/**
* Factory method: parse Accept header string
*
* @param string $headerLine
*
* @param string $headerLine
* @return Accept
*/
public static function fromString($headerLine)
Expand Down Expand Up @@ -87,7 +87,7 @@ public static function fromString($headerLine)

/**
* Get field value
*
*
* @return string
*/
public function getFieldValue()
Expand All @@ -101,10 +101,10 @@ public function getFieldValue()

/**
* Add a type, with the given priority
*
* @param string $type
* @param int|float $priority
* @param int $level
*
* @param string $type
* @param int|float $priority
* @param int $level
* @return Accept
*/
protected function addType($type, $priority = 1, $level = null)
Expand Down Expand Up @@ -140,7 +140,7 @@ protected function addType($type, $priority = 1, $level = null)
$level
));
}

$this->types[$type] = true;

if (!empty($level)) {
Expand All @@ -155,7 +155,7 @@ protected function addType($type, $priority = 1, $level = null)
'priority' => $priority
);
}

$value = $type;
if (!empty($level)) {
$value .= sprintf(';level=%d', $level);
Expand All @@ -170,8 +170,8 @@ protected function addType($type, $priority = 1, $level = null)

/**
* Does the header have the requested type?
*
* @param string $type
*
* @param string $type
* @return bool
*/
protected function hasType($type)
Expand All @@ -184,7 +184,7 @@ protected function hasType($type)
}

// Check for media type
if (false !== strstr($type, '/')) {
if (false !== strstr($type, '/')) {
// Parent type wildcard matching
$parent = substr($type, 0, strpos($type, '/'));
if (isset($this->types[$parent . '/*'])) {
Expand All @@ -206,7 +206,7 @@ protected function hasType($type)

/**
* Get a prioritized list of types
*
*
* @return PriorityQueue
*/
public function getPrioritized()
Expand All @@ -220,7 +220,7 @@ public function getPrioritized()

/**
* Create the priority queue
*
*
* @return void
*/
protected function createPriorityQueue()
Expand All @@ -232,7 +232,7 @@ protected function createPriorityQueue()
continue;
}

// Hack to ensure priorities are correct; was not treating
// Hack to ensure priorities are correct; was not treating
// fractional values correctly
$suffix = '';
$level = 0;
Expand Down
18 changes: 9 additions & 9 deletions src/Header/Accept.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
class Accept extends AbstractAccept
{
protected $regexAddType = '#^([a-zA-Z+-]+|\*)/(\*|[a-zA-Z0-9+-]+)$#';

/**
* Get field name
*
*
* @return string
*/
public function getFieldName()
Expand All @@ -33,7 +33,7 @@ public function getFieldName()

/**
* Cast to string
*
*
* @return string
*/
public function toString()
Expand All @@ -43,10 +43,10 @@ public function toString()

/**
* Add a media type, with the given priority
*
* @param string $type
* @param int|float $priority
* @param int $level
*
* @param string $type
* @param int|float $priority
* @param int $level
* @return Accept
*/
public function addMediaType($type, $priority = 1, $level = null)
Expand All @@ -56,8 +56,8 @@ public function addMediaType($type, $priority = 1, $level = null)

/**
* Does the header have the requested media type?
*
* @param string $type
*
* @param string $type
* @return bool
*/
public function hasMediaType($type)
Expand Down
20 changes: 10 additions & 10 deletions src/Header/AcceptCharset.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
class AcceptCharset extends AbstractAccept
{
protected $regexAddType = '#^([a-zA-Z0-9+-]+|\*)$#';

/**
* Get field name
*
*
* @return string
*/
public function getFieldName()
Expand All @@ -33,30 +33,30 @@ public function getFieldName()

/**
* Cast to string
*
*
* @return string
*/
public function toString()
{
return 'Accept-Charset: ' . $this->getFieldValue();
}

/**
* Add a charset, with the given priority
*
* @param string $type
* @param int|float $priority
*
* @param string $type
* @param int|float $priority
* @return Accept
*/
public function addCharset($type, $priority = 1)
{
return $this->addType($type, $priority);
}

/**
* Does the header have the requested charset?
*
* @param string $type
*
* @param string $type
* @return bool
*/
public function hasCharset($type)
Expand Down
20 changes: 10 additions & 10 deletions src/Header/AcceptEncoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class AcceptEncoding extends AbstractAccept
{

protected $regexAddType = '#^([a-zA-Z0-9+-]+|\*)$#';

/**
* Get field name
*
*
* @return string
*/
public function getFieldName()
Expand All @@ -34,30 +34,30 @@ public function getFieldName()

/**
* Cast to string
*
*
* @return string
*/
public function toString()
{
return 'Accept-Encoding: ' . $this->getFieldValue();
}

/**
* Add an encoding, with the given priority
*
* @param string $type
* @param int|float $priority
*
* @param string $type
* @param int|float $priority
* @return Accept
*/
public function addEncoding($type, $priority = 1)
{
return $this->addType($type, $priority);
}

/**
* Does the header have the requested encoding?
*
* @param string $type
*
* @param string $type
* @return bool
*/
public function hasEncoding($type)
Expand Down
Loading

0 comments on commit 65e3b0b

Please sign in to comment.