summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/Tar.class.php9
-rw-r--r--inc/ZipLib.class.php4
-rw-r--r--inc/auth.php2
-rw-r--r--inc/common.php2
-rw-r--r--inc/events.php11
-rw-r--r--inc/parserutils.php2
-rw-r--r--inc/plugin.php4
-rw-r--r--inc/template.php4
-rw-r--r--inc/utf8.php4
9 files changed, 28 insertions, 14 deletions
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 04246846e..0dc7dace2 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -53,6 +53,7 @@ class Tar {
protected $file = '';
protected $comptype = Tar::COMPRESS_AUTO;
+ /** @var resource|int */
protected $fh;
protected $memory = '';
protected $closed = true;
@@ -530,7 +531,7 @@ class Tar {
* Decode the given tar file header
*
* @param string $block a 512 byte block containign the header data
- * @return array|false
+ * @return false|array
*/
protected function parseHeader($block) {
if(!$block || strlen($block) != 512) return false;
@@ -633,8 +634,14 @@ class Tar {
}
}
+/**
+ * Class TarIOException
+ */
class TarIOException extends Exception {
}
+/**
+ * Class TarIllegalCompressionException
+ */
class TarIllegalCompressionException extends Exception {
}
diff --git a/inc/ZipLib.class.php b/inc/ZipLib.class.php
index 0b7bfa05e..5b524c4ab 100644
--- a/inc/ZipLib.class.php
+++ b/inc/ZipLib.class.php
@@ -142,10 +142,10 @@ class ZipLib {
*
* @param string $data
* @param string $name filename
- * @param int $compact
+ * @param bool $compact
* @return bool
*/
- function add_File($data, $name, $compact = 1) {
+ function add_File($data, $name, $compact = true) {
$name = str_replace('\\', '/', $name);
$dtime = dechex($this->DosTime());
diff --git a/inc/auth.php b/inc/auth.php
index 3a6a2f65a..0342de7be 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -283,7 +283,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $token The authentication token
- * @return boolean true (or will exit on failure)
+ * @return boolean|null true (or will exit on failure)
*/
function auth_validateToken($token) {
if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) {
diff --git a/inc/common.php b/inc/common.php
index 7932fc9f0..d628ab6b2 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1461,7 +1461,7 @@ function dformat($dt = null, $format = '') {
* @author <ungu at terong dot com>
* @link http://www.php.net/manual/en/function.date.php#54072
*
- * @param int $int_date: current date in UNIX timestamp
+ * @param int $int_date current date in UNIX timestamp
* @return string
*/
function date_iso8601($int_date) {
diff --git a/inc/events.php b/inc/events.php
index 4cd06b9f9..256fb561e 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -27,6 +27,9 @@ class Doku_Event {
/**
* event constructor
+ *
+ * @param string $name
+ * @param mixed $data
*/
function Doku_Event($name, &$data) {
@@ -120,14 +123,18 @@ class Doku_Event {
* stop any further processing of the event by event handlers
* this function does not prevent the default action taking place
*/
- function stopPropagation() { $this->_continue = false; }
+ function stopPropagation() {
+ $this->_continue = false;
+ }
/**
* preventDefault
*
* prevent the default action taking place
*/
- function preventDefault() { $this->_default = false; }
+ function preventDefault() {
+ $this->_default = false;
+ }
}
/**
diff --git a/inc/parserutils.php b/inc/parserutils.php
index ef62c8e49..4371f1928 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -655,7 +655,7 @@ function p_render($mode,$instructions,&$info){
* Figure out the correct renderer class to use for $mode,
* instantiate and return it
*
- * @param $mode string Mode of the renderer to get
+ * @param string $mode Mode of the renderer to get
* @return null|Doku_Renderer The renderer
*
* @author Christopher Smith <chris@jalakai.co.uk>
diff --git a/inc/plugin.php b/inc/plugin.php
index 8432b21b2..3bab560cb 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -60,7 +60,7 @@ class DokuWiki_Plugin {
* @return string plugin name
*/
function getPluginName() {
- list($t, $p, $n) = explode('_', get_class($this), 4);
+ list(/* $t */, /* $p */, $n) = explode('_', get_class($this), 4);
return $n;
}
@@ -68,7 +68,7 @@ class DokuWiki_Plugin {
* @return string component name
*/
function getPluginComponent() {
- list($t, $p, $n, $c) = explode('_', get_class($this), 4);
+ list(/* $t */, /* $p */, /* $n */, $c) = explode('_', get_class($this), 4);
return (isset($c)?$c:'');
}
diff --git a/inc/template.php b/inc/template.php
index 98ea9df82..6bb6275f3 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1066,8 +1066,8 @@ function tpl_pagetitle($id = null, $ret = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
*
- * @param array $tags tags to try
- * @param string $alt alternative output if no data was found
+ * @param array|string $tags tags to try
+ * @param string $alt alternative output if no data was found
* @param null|string $src the image src, uses global $SRC if not given
* @return string
*/
diff --git a/inc/utf8.php b/inc/utf8.php
index b3f2b5fe8..f86217686 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -611,7 +611,7 @@ if(!function_exists('utf8_decode_numeric')){
* Decodes numeric HTML entities to their correct UTF-8 characters
*
* @param $ent string A numeric entity
- * @return string
+ * @return string|false
*/
function utf8_decode_numeric($ent) {
switch ($ent[2]) {
@@ -657,7 +657,7 @@ if(!class_exists('utf8_entity_decoder')){
* Decodes any HTML entity to it's correct UTF-8 char equivalent
*
* @param string $ent An entity
- * @return string
+ * @return string|false
*/
function decode($ent) {
if ($ent[1] == '#') {