Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release'

  • Loading branch information...
commit b8473d136cf987ae7b5c680fb75a28adea29ef2a 2 parents da23b85 + b6d35bc
@weierophinney weierophinney authored
View
10 library/Zend/Authentication/Adapter/DbTable.php
@@ -295,14 +295,12 @@ public function getResultRowObject($returnColumns = null, $omitColumns = null)
}
return $returnObject;
- } else {
-
- foreach ($this->resultRow as $resultColumn => $resultValue) {
- $returnObject->{$resultColumn} = $resultValue;
- }
- return $returnObject;
+ }
+ foreach ($this->resultRow as $resultColumn => $resultValue) {
+ $returnObject->{$resultColumn} = $resultValue;
}
+ return $returnObject;
}
/**
View
28 library/Zend/Authentication/Adapter/Http.php
@@ -589,9 +589,9 @@ protected function _digestAuth($header)
if ($this->_secureStringCompare($digest, $data['response'])) {
$identity = array('username'=>$data['username'], 'realm'=>$data['realm']);
return new Authentication\Result(Authentication\Result::SUCCESS, $identity);
- } else {
- return $this->_challengeClient();
}
+
+ return $this->_challengeClient();
}
/**
@@ -682,9 +682,9 @@ protected function _parseDigestAuth($header)
}
if (!ctype_xdigit($temp[1])) {
return false;
- } else {
- $data['nonce'] = $temp[1];
}
+
+ $data['nonce'] = $temp[1];
$temp = null;
$ret = preg_match('/uri="([^"]+)"/', $header, $temp);
@@ -715,9 +715,9 @@ protected function _parseDigestAuth($header)
}
if (32 != strlen($temp[1]) || !ctype_xdigit($temp[1])) {
return false;
- } else {
- $data['response'] = $temp[1];
}
+
+ $data['response'] = $temp[1];
$temp = null;
// The spec says this should default to MD5 if omitted. OK, so how does
@@ -739,9 +739,9 @@ protected function _parseDigestAuth($header)
}
if (!ctype_print($temp[1])) {
return false;
- } else {
- $data['cnonce'] = $temp[1];
}
+
+ $data['cnonce'] = $temp[1];
$temp = null;
// If the server sent an opaque value, the client must send it back
@@ -767,9 +767,9 @@ protected function _parseDigestAuth($header)
if (!$this->ieNoOpaque &&
(32 != strlen($temp[1]) || !ctype_xdigit($temp[1]))) {
return false;
- } else {
- $data['opaque'] = $temp[1];
}
+
+ $data['opaque'] = $temp[1];
$temp = null;
}
@@ -781,9 +781,9 @@ protected function _parseDigestAuth($header)
}
if (!in_array($temp[1], $this->supportedQops)) {
return false;
- } else {
- $data['qop'] = $temp[1];
}
+
+ $data['qop'] = $temp[1];
$temp = null;
// Not optional in this implementation. The spec says this value
@@ -795,9 +795,9 @@ protected function _parseDigestAuth($header)
}
if (8 != strlen($temp[1]) || !ctype_xdigit($temp[1])) {
return false;
- } else {
- $data['nc'] = $temp[1];
}
+
+ $data['nc'] = $temp[1];
$temp = null;
return $data;
View
4 library/Zend/Authentication/Adapter/Ldap.php
@@ -439,9 +439,9 @@ protected function checkGroupMembership(ZendLdap\Ldap $ldap, $canonicalName, $dn
if ($result === 1) {
return true;
- } else {
- return 'Failed to verify group membership with ' . $group->toString();
}
+
+ return 'Failed to verify group membership with ' . $group->toString();
}
/**
View
11 library/Zend/Escaper/Escaper.php
@@ -269,9 +269,8 @@ protected function htmlAttrMatcher($matches)
*/
if ($ord > 255) {
return sprintf('&#x%04X;', $ord);
- } else {
- return sprintf('&#x%02X;', $ord);
}
+ return sprintf('&#x%02X;', $ord);
}
/**
@@ -286,10 +285,9 @@ protected function jsMatcher($matches)
$chr = $matches[0];
if (strlen($chr) == 1) {
return sprintf('\\x%02X', ord($chr));
- } else {
- $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8');
- return sprintf('\\u%04s', strtoupper(bin2hex($chr)));
}
+ $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8');
+ return sprintf('\\u%04s', strtoupper(bin2hex($chr)));
}
/**
@@ -389,8 +387,7 @@ protected function convertEncoding($string, $to, $from)
if ($result === false) {
return ''; // return non-fatal blank string on encoding errors from users
- } else {
- return $result;
}
+ return $result;
}
}
View
25 library/Zend/Http/Headers.php
@@ -264,17 +264,17 @@ public function get($name)
$headers[] = $this->headers[$index];
}
return new ArrayIterator($headers);
- } else {
- $index = array_search($key, $this->headersKeys);
- if ($index === false) {
- return false;
- }
- if (is_array($this->headers[$index])) {
- return $this->lazyLoadHeader($index);
- } else {
- return $this->headers[$index];
- }
}
+
+ $index = array_search($key, $this->headersKeys);
+ if ($index === false) {
+ return false;
+ }
+
+ if (is_array($this->headers[$index])) {
+ return $this->lazyLoadHeader($index);
+ }
+ return $this->headers[$index];
}
/**
@@ -441,11 +441,10 @@ protected function lazyLoadHeader($index)
$this->headers[] = $header;
}
return $current;
- } else {
- $this->headers[$index] = $current = $headers;
- return $current;
}
+ $this->headers[$index] = $current = $headers;
+ return $current;
}
/**
View
3  library/Zend/Http/Response.php
@@ -511,8 +511,7 @@ protected function decodeDeflate($body)
if ($zlibHeader[1] % 31 == 0) {
return gzuncompress($body);
- } else {
- return gzinflate($body);
}
+ return gzinflate($body);
}
}
View
1  library/Zend/Json/Encoder.php
@@ -95,7 +95,6 @@ protected function _encodeValue(&$value)
}
-
/**
* Encode an object to JSON by encoding each of the public properties
*
View
3  library/Zend/Json/Json.php
@@ -202,9 +202,8 @@ protected static function _getXmlValue($simpleXmlElementObject)
$match = preg_match($pattern, $simpleXmlElementObject, $matchings);
if ($match) {
return new Expr($matchings[1]);
- } else {
- return (trim(strval($simpleXmlElementObject)));
}
+ return (trim(strval($simpleXmlElementObject)));
}
/**
View
15 library/Zend/Ldap/Collection.php
@@ -88,9 +88,8 @@ public function getFirst()
if ($this->count() > 0) {
$this->rewind();
return $this->current();
- } else {
- return null;
}
+ return null;
}
/**
@@ -135,9 +134,8 @@ public function current()
$this->cache[$this->current] = $this->createEntry($current);
}
return $this->cache[$this->current];
- } else {
- return null;
}
+ return null;
}
/**
@@ -163,9 +161,8 @@ public function dn()
$this->rewind();
}
return $this->iterator->key();
- } else {
- return null;
}
+ return null;
}
/**
@@ -181,9 +178,8 @@ public function key()
$this->rewind();
}
return $this->current;
- } else {
- return null;
}
+ return null;
}
/**
@@ -221,8 +217,7 @@ public function valid()
{
if (isset($this->cache[$this->current])) {
return true;
- } else {
- return $this->iterator->valid();
}
+ return $this->iterator->valid();
}
}
View
12 library/Zend/Ldap/Dn.php
@@ -57,9 +57,8 @@ public static function factory($dn, $caseFold = null)
return self::fromArray($dn, $caseFold);
} elseif (is_string($dn)) {
return self::fromString($dn, $caseFold);
- } else {
- throw new Exception\LdapException(null, 'Invalid argument type for $dn');
}
+ throw new Exception\LdapException(null, 'Invalid argument type for $dn');
}
/**
@@ -168,9 +167,8 @@ public function get($index, $length = 1, $caseFold = null)
}
if ($length === 1) {
return self::caseFoldRdn($this->dn[$index], $caseFold);
- } else {
- return self::caseFoldDn(array_slice($this->dn, $index, $length, false), $caseFold);
}
+ return self::caseFoldDn(array_slice($this->dn, $index, $length, false), $caseFold);
}
/**
@@ -325,9 +323,8 @@ public function toArray($caseFold = null)
if ($caseFold === self::ATTR_CASEFOLD_NONE) {
return $this->dn;
- } else {
- return self::caseFoldDn($this->dn, $caseFold);
}
+ return self::caseFoldDn($this->dn, $caseFold);
}
/**
@@ -387,9 +384,8 @@ public function offsetExists($offset)
$offset = (int)$offset;
if ($offset < 0 || $offset >= count($this->dn)) {
return false;
- } else {
- return true;
}
+ return true;
}
/**
View
3  library/Zend/Ldap/Ldap.php
@@ -982,9 +982,8 @@ public function count($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB)
} catch (Exception\LdapException $e) {
if ($e->getCode() === Exception\LdapException::LDAP_NO_SUCH_OBJECT) {
return 0;
- } else {
- throw $e;
}
+ throw $e;
}
return $result->count();
View
10 library/Zend/Ldap/Node.php
@@ -395,9 +395,9 @@ public function willBeMoved()
return false;
} elseif ($this->newDn !== null) {
return ($this->dn != $this->newDn);
- } else {
- return false;
}
+
+ return false;
}
/**
@@ -995,12 +995,10 @@ public function hasChildren()
if (!is_array($this->children)) {
if ($this->isAttached()) {
return ($this->countChildren() > 0);
- } else {
- return false;
}
- } else {
- return (count($this->children) > 0);
+ return false;
}
+ return (count($this->children) > 0);
}
/**
View
6 library/Zend/Mime/Part.php
@@ -124,9 +124,8 @@ public function getContent($EOL = Mime::LINEEND)
{
if ($this->isStream) {
return stream_get_contents($this->getEncodedStream());
- } else {
- return Mime::encode($this->content, $this->encoding, $EOL);
}
+ return Mime::encode($this->content, $this->encoding, $EOL);
}
/**
@@ -137,9 +136,8 @@ public function getRawContent()
{
if ($this->isStream) {
return stream_get_contents($this->content);
- } else {
- return $this->content;
}
+ return $this->content;
}
/**
View
3  library/Zend/Paginator/Paginator.php
@@ -828,9 +828,8 @@ public function toJson()
if ($currentItems instanceof DbAbstractRowset) {
return Json::encode($currentItems->toArray());
- } else {
- return Json::encode($currentItems);
}
+ return Json::encode($currentItems);
}
/**
View
3  library/Zend/Soap/Wsdl.php
@@ -521,9 +521,8 @@ public function dump($filename = false)
if (!$filename) {
echo $this->toXML();
return true;
- } else {
- return file_put_contents($filename, $this->toXML());
}
+ return file_put_contents($filename, $this->toXML());
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.