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

Commit

Permalink
Merge branch 'master' into acceptHandling
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Http/Header/AbstractAccept.php
	library/Zend/Http/Header/AcceptEncoding.php
	library/Zend/Http/Header/AcceptLanguage.php
	tests/Zend/Http/Header/AcceptCharsetTest.php
	tests/Zend/Http/Header/AcceptEncodingTest.php
	tests/Zend/Http/Header/AcceptLanguageTest.php
	tests/Zend/Http/Header/AcceptTest.php
  • Loading branch information
Freeaqingme committed Jul 14, 2012
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/Adapter/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class InvalidArgumentException
extends Exception\InvalidArgumentException
implements ExceptionInterface
{
}
}
2 changes: 1 addition & 1 deletion src/Adapter/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package Zend_Authentication
* @subpackage Adapter
*/
class RuntimeException extends Exception\RuntimeException implements
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Adapter/Exception/UnexpectedValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package Zend_Authentication
* @subpackage Adapter
*/
class UnexpectedValueException extends Exception\UnexpectedValueException implements
class UnexpectedValueException extends Exception\UnexpectedValueException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Adapter/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ protected function _basicAuth($header)
}

$result = $this->_basicResolver->resolve($creds[0], $this->_realm, $creds[1]);

if ($result
&& !is_array($result)
&& $this->_secureStringCompare($result, $creds[1])
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/Http/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package Zend_Authentication
* @subpackage Adapter_Http
*/
class InvalidArgumentException extends Exception\InvalidArgumentException implements
class InvalidArgumentException extends Exception\InvalidArgumentException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Adapter/Http/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package Zend_Authentication
* @subpackage Adapter_Http
*/
class RuntimeException extends Exception\RuntimeException implements
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{
}
4 changes: 2 additions & 2 deletions src/Adapter/Http/FileResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ public function resolve($username, $realm, $password = null)
{
if (empty($username)) {
throw new Exception\InvalidArgumentException('Username is required');
} else if (!ctype_print($username) || strpos($username, ':') !== false) {
} elseif (!ctype_print($username) || strpos($username, ':') !== false) {
throw new Exception\InvalidArgumentException('Username must consist only of printable characters, '
. 'excluding the colon');
}
if (empty($realm)) {
throw new Exception\InvalidArgumentException('Realm is required');
} else if (!ctype_print($realm) || strpos($realm, ':') !== false) {
} elseif (!ctype_print($realm) || strpos($realm, ':') !== false) {
throw new Exception\InvalidArgumentException('Realm must consist only of printable characters, '
. 'excluding the colon.');
}
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,11 @@ public function authenticate()
* server options.
*/
continue;
} else if ($err == LdapException::LDAP_NO_SUCH_OBJECT) {
} elseif ($err == LdapException::LDAP_NO_SUCH_OBJECT) {
$code = AuthenticationResult::FAILURE_IDENTITY_NOT_FOUND;
$messages[0] = "Account not found: $username";
$failedAuthorities[$dname] = $zle->getMessage();
} else if ($err == LdapException::LDAP_INVALID_CREDENTIALS) {
} elseif ($err == LdapException::LDAP_INVALID_CREDENTIALS) {
$code = AuthenticationResult::FAILURE_CREDENTIAL_INVALID;
$messages[0] = 'Invalid credentials';
$failedAuthorities[$dname] = $zle->getMessage();
Expand Down
6 changes: 3 additions & 3 deletions src/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class AuthenticationService

/**
* Constructor
*
* @param Storage\StorageInterface $storage
* @param Adapter\AdapterInterface $adapter
*
* @param Storage\StorageInterface $storage
* @param Adapter\AdapterInterface $adapter
*/
public function __construct(Storage\StorageInterface $storage = null, Adapter\AdapterInterface $adapter = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @package Zend_Authentication
* @subpackage Exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Exception/UnexpectedValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @package Zend_Authentication
* @subpackage Exception
*/
class UnexpectedValueException extends \UnexpectedValueException implements
class UnexpectedValueException extends \UnexpectedValueException implements
ExceptionInterface
{
}
10 changes: 5 additions & 5 deletions test/Adapter/Http/AuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace ZendTest\Authentication\Adapter\Http;

use Zend\Authentication\Adapter\Http,
Zend\Http\Headers,
Zend\Http\Request,
Zend\Http\Response,
Zend\Stdlib\Parameters;
use Zend\Authentication\Adapter\Http;
use Zend\Http\Headers;
use Zend\Http\Request;
use Zend\Http\Response;
use Zend\Stdlib\Parameters;

/**
* @category Zend
Expand Down
12 changes: 6 additions & 6 deletions test/Adapter/Http/ObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

namespace ZendTest\Authentication\Adapter\Http;

use Zend\Authentication\Adapter\Http,
Zend\Authentication\Adapter,
Zend\Authentication,
Zend\Http\Headers,
Zend\Http\Request,
Zend\Http\Response;
use Zend\Authentication\Adapter\Http;
use Zend\Authentication\Adapter;
use Zend\Authentication;
use Zend\Http\Headers;
use Zend\Http\Request;
use Zend\Http\Response;

/**
* @category Zend
Expand Down
10 changes: 5 additions & 5 deletions test/Adapter/Http/ProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace ZendTest\Authentication\Adapter\Http;

use Zend\Authentication\Adapter\Http,
Zend\Http\Headers,
Zend\Http\Request,
Zend\Http\Response,
Zend\Stdlib\Parameters;
use Zend\Authentication\Adapter\Http;
use Zend\Http\Headers;
use Zend\Http\Request;
use Zend\Http\Response;
use Zend\Stdlib\Parameters;

/**
* @category Zend
Expand Down
4 changes: 2 additions & 2 deletions test/Adapter/Ldap/OfflineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

namespace ZendTest\Authentication\Adapter\Ldap;

use Zend\Authentication\Adapter,
Zend\Ldap;
use Zend\Authentication\Adapter;
use Zend\Ldap;

/**
* @category Zend
Expand Down
6 changes: 3 additions & 3 deletions test/Adapter/Ldap/OnlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

namespace ZendTest\Authentication\Adapter\Ldap;

use Zend\Authentication,
Zend\Authentication\Adapter,
Zend\Ldap;
use Zend\Authentication;
use Zend\Authentication\Adapter;
use Zend\Ldap;

/**
* @category Zend
Expand Down
4 changes: 2 additions & 2 deletions test/AuthenticationServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

namespace ZendTest\Authentication;

use Zend\Authentication\AuthenticationService,
Zend\Authentication as Auth;
use Zend\Authentication\AuthenticationService;
use Zend\Authentication as Auth;

/**
* @category Zend
Expand Down
4 changes: 2 additions & 2 deletions test/TestAsset/SuccessAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

namespace ZendTest\Authentication\TestAsset;

use Zend\Authentication\Adapter\AdapterInterface as AuthenticationAdapter,
Zend\Authentication\Result as AuthenticationResult;
use Zend\Authentication\Adapter\AdapterInterface as AuthenticationAdapter;
use Zend\Authentication\Result as AuthenticationResult;

class SuccessAdapter implements AuthenticationAdapter
{
Expand Down

0 comments on commit 1702218

Please sign in to comment.