Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-03-28 03:42:39 +0400
committermattab <matthieu.aubry@gmail.com>2013-03-28 03:42:40 +0400
commitae4b03163792f0b6e933933e5d37df87dc3fd566 (patch)
treed1d7510a9728f587d3d63ebd03e4ecf3d904838b /core/Auth.php
parent158c2150f5f2e13ece459b8d131244c11b763997 (diff)
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/
Diffstat (limited to 'core/Auth.php')
-rw-r--r--core/Auth.php79
1 files changed, 40 insertions, 39 deletions
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;
}
}