diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-10-01 15:32:05 +0200 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-10-01 15:32:05 +0200 |
commit | 253d4b48ec708eb42033862dc15c8576f44a48ed (patch) | |
tree | d8673e304f0deaacb7a20a31cba7b82744a00bed /lib/plugins/popularity | |
parent | 42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 (diff) | |
download | rpg-253d4b48ec708eb42033862dc15c8576f44a48ed.tar.gz rpg-253d4b48ec708eb42033862dc15c8576f44a48ed.tar.bz2 |
more PHPDocs, unused var, small bit code reformatting
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': |