From ae4b03163792f0b6e933933e5d37df87dc3fd566 Mon Sep 17 00:00:00 2001 From: mattab Date: Thu, 28 Mar 2013 12:42:39 +1300 Subject: Mass conversion of all files to the newly agreed coding standard: PSR 1/2 Converting Piwik core source files, PHP, JS, TPL, CSS More info: http://piwik.org/participate/coding-standards/ --- core/Auth.php | 79 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) (limited to 'core/Auth.php') diff --git a/core/Auth.php b/core/Auth.php index 5e58eca147..252a31afbd 100644 --- a/core/Auth.php +++ b/core/Auth.php @@ -15,20 +15,21 @@ * @package Piwik * @subpackage Piwik_Auth */ -interface Piwik_Auth { - /** - * Authentication module's name, e.g., "Login" - * - * @return string - */ - public function getName(); +interface Piwik_Auth +{ + /** + * Authentication module's name, e.g., "Login" + * + * @return string + */ + public function getName(); - /** - * Authenticates user - * - * @return Piwik_Auth_Result - */ - public function authenticate(); + /** + * Authenticates user + * + * @return Piwik_Auth_Result + */ + public function authenticate(); } /** @@ -41,32 +42,32 @@ interface Piwik_Auth { */ class Piwik_Auth_Result extends Zend_Auth_Result { - /** - * token_auth parameter used to authenticate in the API - * - * @var string - */ - protected $_token_auth = null; - - const SUCCESS_SUPERUSER_AUTH_CODE = 42; + /** + * token_auth parameter used to authenticate in the API + * + * @var string + */ + protected $_token_auth = null; + + const SUCCESS_SUPERUSER_AUTH_CODE = 42; + + /** + * Constructor for Piwik_Auth_Result + * + * @param int $code + * @param string $login identity + * @param string $token_auth + * @param array $messages + */ + public function __construct($code, $login, $token_auth, array $messages = array()) + { + // Piwik_Auth_Result::SUCCESS_SUPERUSER_AUTH_CODE, Piwik_Auth_Result::SUCCESS, Piwik_Auth_Result::FAILURE + $this->_code = (int)$code; + $this->_identity = $login; + $this->_messages = $messages; + $this->_token_auth = $token_auth; + } - /** - * Constructor for Piwik_Auth_Result - * - * @param int $code - * @param string $login identity - * @param string $token_auth - * @param array $messages - */ - public function __construct($code, $login, $token_auth, array $messages = array()) - { - // Piwik_Auth_Result::SUCCESS_SUPERUSER_AUTH_CODE, Piwik_Auth_Result::SUCCESS, Piwik_Auth_Result::FAILURE - $this->_code = (int)$code; - $this->_identity = $login; - $this->_messages = $messages; - $this->_token_auth = $token_auth; - } - /** * Returns the token_auth to authenticate the current user in the API * @@ -74,6 +75,6 @@ class Piwik_Auth_Result extends Zend_Auth_Result */ public function getTokenAuth() { - return $this->_token_auth; + return $this->_token_auth; } } -- cgit v1.2.3