Skip to content

Commit

Permalink
added missing { and } after if
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored and Ocramius committed Apr 13, 2014
1 parent 7b51673 commit addcb37
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
4 changes: 3 additions & 1 deletion library/Zend/Http/Client/Adapter/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ public function connect($host, $port = 80, $secure = false)
public function write($method, $uri, $httpVer = '1.1', $headers = array(), $body = '')
{
// If no proxy is set, fall back to default Socket adapter
if (! $this->config['proxy_host']) return parent::write($method, $uri, $httpVer, $headers, $body);
if (! $this->config['proxy_host']) {
return parent::write($method, $uri, $httpVer, $headers, $body);
}

// Make sure we're properly connected
if (! $this->socket) {
Expand Down
4 changes: 3 additions & 1 deletion library/Zend/Http/Client/Adapter/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ public function read()
$statusCode = $responseObj->getStatusCode();

// Handle 100 and 101 responses internally by restarting the read again
if ($statusCode == 100 || $statusCode == 101) return $this->read();
if ($statusCode == 100 || $statusCode == 101) {
return $this->read();
}

// Check headers to see what kind of connection / transfer encoding we have
$headers = $responseObj->getHeaders();
Expand Down
4 changes: 3 additions & 1 deletion library/Zend/Http/Header/AbstractAccept.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ protected function sortFieldValueParts()
//@todo count number of dots in case of type==application in subtype

// So far they're still the same. Longest string length may be more specific
if (strlen($a->raw) == strlen($b->raw)) return 0;
if (strlen($a->raw) == strlen($b->raw)) {
return 0;
}
return (strlen($a->raw) > strlen($b->raw)) ? -1 : 1;
};

Expand Down
12 changes: 9 additions & 3 deletions library/Zend/Http/Header/SetCookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,15 @@ public function match($uri, $matchSessionCookies = true, $now = null)
}

// Check that the cookie is secure (if required) and not expired
if ($this->secure && $uri->getScheme() != 'https') return false;
if ($this->isExpired($now)) return false;
if ($this->isSessionCookie() && ! $matchSessionCookies) return false;
if ($this->secure && $uri->getScheme() != 'https') {
return false;
}
if ($this->isExpired($now)) {
return false;
}
if ($this->isSessionCookie() && ! $matchSessionCookies) {
return false;
}

// Check if the domain matches
if (! self::matchCookieDomain($this->getDomain(), $uri->getHost())) {
Expand Down
4 changes: 3 additions & 1 deletion library/Zend/Loader/SplAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

use Traversable;

if (interface_exists('Zend\Loader\SplAutoloader')) return;
if (interface_exists('Zend\Loader\SplAutoloader')) {
return;
}

/**
* Defines an interface for classes that may register with the spl_autoload
Expand Down

0 comments on commit addcb37

Please sign in to comment.