diff options
author | Christian Raue <christian.raue@gmail.com> | 2014-07-10 17:45:54 +0400 |
---|---|---|
committer | Christian Raue <christian.raue@gmail.com> | 2014-07-15 14:16:49 +0400 |
commit | 317bd7e175f04e09cfb6b42f4a282068524df4e0 (patch) | |
tree | 2a6c8bc07bc806229bb7f8dc035198e745b34efb /core/Piwik.php | |
parent | f6de9efc06b11e067fe4f866377a94996628f796 (diff) |
fixed method signatures
Diffstat (limited to 'core/Piwik.php')
-rw-r--r-- | core/Piwik.php | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/core/Piwik.php b/core/Piwik.php index 7e64d9021e..d1baf061ff 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -63,7 +63,7 @@ class Piwik * * @param string $message */ - static public function error($message = '') + public static function error($message = '') { trigger_error($message, E_USER_ERROR); } @@ -74,7 +74,7 @@ class Piwik * * @param string $message */ - static public function exitWithErrorMessage($message) + public static function exitWithErrorMessage($message) { if (!Common::isPhpCliMode()) { @header('Content-Type: text/html; charset=utf-8'); @@ -97,7 +97,7 @@ class Piwik * @param number $i2 * @return number The result of the division or zero */ - static public function secureDiv($i1, $i2) + public static function secureDiv($i1, $i2) { if (is_numeric($i1) && is_numeric($i2) && floatval($i2) != 0) { return $i1 / $i2; @@ -113,7 +113,7 @@ class Piwik * @param int $precision * @return number */ - static public function getPercentageSafe($dividend, $divisor, $precision = 0) + public static function getPercentageSafe($dividend, $divisor, $precision = 0) { if ($divisor == 0) { return 0; @@ -128,7 +128,7 @@ class Piwik * @param string $piwikUrl http://path/to/piwik/directory/ * @return string */ - static public function getJavascriptCode($idSite, $piwikUrl, $mergeSubdomains = false, $groupPageTitlesByDomain = false, + public static function getJavascriptCode($idSite, $piwikUrl, $mergeSubdomains = false, $groupPageTitlesByDomain = false, $mergeAliasUrls = false, $visitorCustomVariables = false, $pageCustomVariables = false, $customCampaignNameQueryParam = false, $customCampaignKeywordParam = false, $doNotTrack = false) @@ -224,7 +224,7 @@ class Piwik * * @return string */ - static public function getRandomTitle() + public static function getRandomTitle() { static $titles = array( 'Web analytics', @@ -254,7 +254,7 @@ class Piwik * @return string * @api */ - static public function getCurrentUserEmail() + public static function getCurrentUserEmail() { $user = APIUsersManager::getInstance()->getUser(Piwik::getCurrentUserLogin()); return $user['email']; @@ -265,7 +265,7 @@ class Piwik * * @return array */ - static public function getAllSuperUserAccessEmailAddresses() + public static function getAllSuperUserAccessEmailAddresses() { $emails = array(); @@ -288,7 +288,7 @@ class Piwik * @return string * @api */ - static public function getCurrentUserLogin() + public static function getCurrentUserLogin() { return Access::getInstance()->getLogin(); } @@ -299,7 +299,7 @@ class Piwik * @return string * @api */ - static public function getCurrentUserTokenAuth() + public static function getCurrentUserTokenAuth() { return Access::getInstance()->getTokenAuth(); } @@ -312,7 +312,7 @@ class Piwik * @return bool * @api */ - static public function hasUserSuperUserAccessOrIsTheUser($theUser) + public static function hasUserSuperUserAccessOrIsTheUser($theUser) { try { self::checkUserHasSuperUserAccessOrIsTheUser($theUser); @@ -329,7 +329,7 @@ class Piwik * @throws NoAccessException If the user is neither the Super User nor the user `$theUser`. * @api */ - static public function checkUserHasSuperUserAccessOrIsTheUser($theUser) + public static function checkUserHasSuperUserAccessOrIsTheUser($theUser) { try { if (Piwik::getCurrentUserLogin() !== $theUser) { @@ -348,7 +348,7 @@ class Piwik * @return bool * @api */ - static public function hasTheUserSuperUserAccess($theUser) + public static function hasTheUserSuperUserAccess($theUser) { if (empty($theUser)) { return false; @@ -380,7 +380,7 @@ class Piwik * @return bool * @api */ - static public function hasUserSuperUserAccess() + public static function hasUserSuperUserAccess() { try { self::checkUserHasSuperUserAccess(); @@ -396,7 +396,7 @@ class Piwik * @return bool * @api */ - static public function isUserIsAnonymous() + public static function isUserIsAnonymous() { return Piwik::getCurrentUserLogin() == 'anonymous'; } @@ -407,7 +407,7 @@ class Piwik * @throws NoAccessException if the current user is the anonymous user. * @api */ - static public function checkUserIsNotAnonymous() + public static function checkUserIsNotAnonymous() { if (Access::getInstance()->hasSuperUserAccess()) { return; @@ -423,7 +423,7 @@ class Piwik * * @param bool $bool true to set current user as Super User */ - static public function setUserHasSuperUserAccess($bool = true) + public static function setUserHasSuperUserAccess($bool = true) { Access::getInstance()->setSuperUserAccess($bool); } @@ -434,7 +434,7 @@ class Piwik * @throws Exception if the current user is not the superuser. * @api */ - static public function checkUserHasSuperUserAccess() + public static function checkUserHasSuperUserAccess() { Access::getInstance()->checkUserHasSuperUserAccess(); } @@ -446,7 +446,7 @@ class Piwik * @return bool * @api */ - static public function isUserHasAdminAccess($idSites) + public static function isUserHasAdminAccess($idSites) { try { self::checkUserHasAdminAccess($idSites); @@ -463,7 +463,7 @@ class Piwik * @throws Exception If user doesn't have admin access. * @api */ - static public function checkUserHasAdminAccess($idSites) + public static function checkUserHasAdminAccess($idSites) { Access::getInstance()->checkUserHasAdminAccess($idSites); } @@ -474,7 +474,7 @@ class Piwik * @return bool * @api */ - static public function isUserHasSomeAdminAccess() + public static function isUserHasSomeAdminAccess() { try { self::checkUserHasSomeAdminAccess(); @@ -490,7 +490,7 @@ class Piwik * @throws Exception if user doesn't have admin access to any site. * @api */ - static public function checkUserHasSomeAdminAccess() + public static function checkUserHasSomeAdminAccess() { Access::getInstance()->checkUserHasSomeAdminAccess(); } @@ -502,7 +502,7 @@ class Piwik * @return bool * @api */ - static public function isUserHasViewAccess($idSites) + public static function isUserHasViewAccess($idSites) { try { self::checkUserHasViewAccess($idSites); @@ -519,7 +519,7 @@ class Piwik * @throws Exception if the current user does not have view access to every site in the list. * @api */ - static public function checkUserHasViewAccess($idSites) + public static function checkUserHasViewAccess($idSites) { Access::getInstance()->checkUserHasViewAccess($idSites); } @@ -530,7 +530,7 @@ class Piwik * @return bool * @api */ - static public function isUserHasSomeViewAccess() + public static function isUserHasSomeViewAccess() { try { self::checkUserHasSomeViewAccess(); @@ -546,7 +546,7 @@ class Piwik * @throws Exception if user doesn't have view access to any site. * @api */ - static public function checkUserHasSomeViewAccess() + public static function checkUserHasSomeViewAccess() { Access::getInstance()->checkUserHasSomeViewAccess(); } @@ -562,7 +562,7 @@ class Piwik * * @return string */ - static public function getLoginPluginName() + public static function getLoginPluginName() { return Registry::get('auth')->getName(); } @@ -572,7 +572,7 @@ class Piwik * * @return Plugin */ - static public function getCurrentPlugin() + public static function getCurrentPlugin() { return \Piwik\Plugin\Manager::getInstance()->getLoadedPlugin(Piwik::getModule()); } @@ -582,7 +582,7 @@ class Piwik * * @return string */ - static public function getModule() + public static function getModule() { return Common::getRequestVar('module', '', 'string'); } @@ -592,7 +592,7 @@ class Piwik * * @return string */ - static public function getAction() + public static function getAction() { return Common::getRequestVar('action', '', 'string'); } @@ -606,7 +606,7 @@ class Piwik * @param array|string $columns * @return array */ - static public function getArrayFromApiParameter($columns) + public static function getArrayFromApiParameter($columns) { if (empty($columns)) { return array(); @@ -627,7 +627,7 @@ class Piwik * @param array $parameters The query parameter values to modify before redirecting. * @api */ - static public function redirectToModule($newModule, $newAction = '', $parameters = array()) + public static function redirectToModule($newModule, $newAction = '', $parameters = array()) { $newUrl = 'index.php' . Url::getCurrentQueryStringWithParametersModified( array('module' => $newModule, 'action' => $newAction) @@ -647,7 +647,7 @@ class Piwik * @return bool * @api */ - static public function isValidEmailString($emailAddress) + public static function isValidEmailString($emailAddress) { return (preg_match('/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]{2,7}$/D', $emailAddress) > 0); } @@ -661,7 +661,7 @@ class Piwik * @throws Exception * @return bool */ - static public function checkValidLoginString($userLogin) + public static function checkValidLoginString($userLogin) { if (!SettingsPiwik::isUserCredentialsSanityCheckEnabled() && !empty($userLogin) @@ -686,7 +686,7 @@ class Piwik * @param array $types List of class names that $o is expected to be one of. * @throws Exception if $o is not an instance of the types contained in $types. */ - static public function checkObjectTypeIs($o, $types) + public static function checkObjectTypeIs($o, $types) { foreach ($types as $type) { if ($o instanceof $type) { @@ -708,7 +708,7 @@ class Piwik * @param array $array * @return bool */ - static public function isAssociativeArray($array) + public static function isAssociativeArray($array) { reset($array); if (!is_numeric(key($array)) |