aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-10-28 22:27:25 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-10-28 23:05:46 +0100
commit7f58a4572eaca75aecff2da889e67ea151616011 (patch)
treeeaf63a3cbcfac54cd656a380e0c0f2800dfe660e /phpBB/phpbb/auth
parent2afd47b938f5cf9b89a46f44d6e022c38695764d (diff)
downloadforums-7f58a4572eaca75aecff2da889e67ea151616011.tar
forums-7f58a4572eaca75aecff2da889e67ea151616011.tar.gz
forums-7f58a4572eaca75aecff2da889e67ea151616011.tar.bz2
forums-7f58a4572eaca75aecff2da889e67ea151616011.tar.xz
forums-7f58a4572eaca75aecff2da889e67ea151616011.zip
[ticket/11981] Fix code sniffer complaints
PHPBB3-11981
Diffstat (limited to 'phpBB/phpbb/auth')
-rw-r--r--phpBB/phpbb/auth/provider/ldap.php1
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php12
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php4
3 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/phpbb/auth/provider/ldap.php b/phpBB/phpbb/auth/provider/ldap.php
index 9d29789567..2123a587cb 100644
--- a/phpBB/phpbb/auth/provider/ldap.php
+++ b/phpBB/phpbb/auth/provider/ldap.php
@@ -97,7 +97,6 @@ class ldap extends \phpbb\auth\provider\base
@ldap_close($ldap);
-
if (!is_array($result) || sizeof($result) < 2)
{
return sprintf($this->user->lang['LDAP_NO_IDENTITY'], $this->user->data['username']);
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index de81ac0d04..5df56db00a 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -179,7 +179,7 @@ class oauth extends \phpbb\auth\provider\base
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
$query = 'mode=login&login=external&oauth_service=' . $service_name_original;
- $service = $this->get_service($service_name_original, $storage, $service_credentials, $this->service_providers[$service_name]->get_auth_scope(), $query);
+ $service = $this->get_service($service_name_original, $storage, $service_credentials, $query, $this->service_providers[$service_name]->get_auth_scope());
if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
{
@@ -273,13 +273,13 @@ class oauth extends \phpbb\auth\provider\base
* @param string $service_name The name of the service
* @param \phpbb\auth\provider\oauth\token_storage $storage
* @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials}
- * @param array $scope The scope of the request against
- * the api.
* @param string $query The query string of the
* current_uri used in redirection
+ * @param array $scope The scope of the request against
+ * the api.
* @return \OAuth\Common\Service\ServiceInterface
*/
- protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, array $scopes = array(), $query)
+ protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array())
{
$current_uri = $this->get_current_uri($service_name, $query);
@@ -458,7 +458,7 @@ class oauth extends \phpbb\auth\provider\base
// Prepare for an authentication request
$service_credentials = $this->service_providers[$service_name]->get_service_credentials();
$scopes = $this->service_providers[$service_name]->get_auth_scope();
- $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query);
+ $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes);
$this->service_providers[$service_name]->set_external_service_provider($service);
// The user has already authenticated successfully, request to authenticate again
@@ -491,7 +491,7 @@ class oauth extends \phpbb\auth\provider\base
$query = 'i=ucp_auth_link&mode=auth_link&link=1&oauth_service=' . strtolower($link_data['oauth_service']);
$service_credentials = $this->service_providers[$service_name]->get_service_credentials();
$scopes = $this->service_providers[$service_name]->get_auth_scope();
- $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query);
+ $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes);
if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
{
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
index 2ce0e32da3..cc912abf6d 100644
--- a/phpBB/phpbb/auth/provider/oauth/token_storage.php
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -78,7 +78,7 @@ class token_storage implements TokenStorageInterface
{
$service = $this->get_service_name_for_db($service);
- if ($this->cachedToken instanceOf TokenInterface)
+ if ($this->cachedToken instanceof TokenInterface)
{
return $this->cachedToken;
}
@@ -238,7 +238,7 @@ class token_storage implements TokenStorageInterface
{
$service = $this->get_service_name_for_db($service);
- if ($this->cachedToken instanceOf TokenInterface) {
+ if ($this->cachedToken instanceof TokenInterface) {
return $this->cachedToken;
}