diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-12-09 20:11:00 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-12-09 20:11:00 +0100 |
commit | 61a4313f55c7e83e0b78c9c6a8eb2efb13ff0512 (patch) | |
tree | c7269ea61f5d4230a6f916dbabee4ce412e0a9fb /lib/plugins/popularity | |
parent | 9a0ca2cfd8ac42895af3be2efbd2cab7e6d33578 (diff) | |
parent | 8702de7f7e170bddfdb622c393c3cac3446fd1c5 (diff) | |
download | rpg-61a4313f55c7e83e0b78c9c6a8eb2efb13ff0512.tar.gz rpg-61a4313f55c7e83e0b78c9c6a8eb2efb13ff0512.tar.bz2 |
Merge pull request #945 from splitbrain/scrutinizerissues
Scrutinizer issues and IXR library updates
Diffstat (limited to 'lib/plugins/popularity')
-rw-r--r-- | lib/plugins/popularity/helper.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index eacde06d0..b4fb33b90 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -74,6 +74,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Check if autosubmit is enabled + * * @return boolean TRUE if we should send data once a month, FALSE otherwise */ function isAutoSubmitEnabled(){ @@ -82,6 +83,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Send the data, to the submit url + * * @param string $data The popularity data * @return string An empty string if everything worked fine, a string describing the error otherwise */ @@ -97,6 +99,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Compute the last time the data was sent. If it has never been sent, we return 0. + * + * @return int */ function lastSentTime(){ $manualSubmission = @filemtime($this->popularityLastSubmitFile); @@ -107,6 +111,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information + * * @return string The popularity data as a string */ function gatherAsString(){ @@ -124,6 +129,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information + * * @return array The popularity data as an array */ function _gather(){ @@ -288,17 +294,24 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * * @author <gilthans dot NO dot SPAM at gmail dot com> * @link http://de3.php.net/manual/en/ini.core.php#79564 + * + * @param string $v + * @return int|string */ function _to_byte($v){ $l = substr($v, -1); $ret = substr($v, 0, -1); switch(strtoupper($l)){ + /** @noinspection PhpMissingBreakStatementInspection */ case 'P': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'T': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'G': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'M': $ret *= 1024; case 'K': |