From 276820f70d7e96ee375735c1a15bdc0a8331a5a7 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Sat, 10 Jan 2015 14:47:51 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- inc/JpegMeta.php | 52 +++++++++++++++++++ inc/parser/handler.php | 6 +++ inc/parser/parser.php | 9 ++++ lib/plugins/authplain/_test/escaping.test.php | 6 +++ 4 files changed, 73 insertions(+) diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index 4cdebcc369..cd082cbba8 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -1106,6 +1106,10 @@ function _parseAll() { } /*************************************************************/ + + /** + * @param string $outputName + */ function _writeJPEG($outputName) { $this->_parseAll(); @@ -1238,6 +1242,12 @@ function _writeJPEG($outputName) { } /*************************************************************/ + + /** + * @param integer $marker + * @param integer $length + * @param integer $origLength + */ function _writeJPEGMarker($marker, $length, &$data, $origLength) { if ($length <= 0) { return false; @@ -1565,6 +1575,7 @@ function _parseMarkerXmp() { * Parses XMP nodes by recursion * * @author Hakan Sandell + * @param integer $count */ function _parseXmpNode($values, &$i, &$meta, $count) { if ($values[$i]['type'] == 'close') return; @@ -1668,6 +1679,12 @@ function _parseMarkerExif() { } /*************************************************************/ + + /** + * @param integer $base + * @param boolean $isBigEndian + * @param string $mode + */ function _readIFD($data, $base, $offset, $isBigEndian, $mode) { $EXIFTags = $this->_exifTagNames($mode); @@ -1923,6 +1940,12 @@ function & _createMarkerExif() { } /*************************************************************/ + + /** + * @param integer $offsetBase + * @param boolean $isBigEndian + * @param boolean $hasNext + */ function _writeIFD(&$data, $pos, $offsetBase, &$entries, $isBigEndian, $hasNext) { $tiffData = null; $tiffDataOffsetPos = -1; @@ -1979,6 +2002,11 @@ function _writeIFD(&$data, $pos, $offsetBase, &$entries, $isBigEndian, $hasNext) } /*************************************************************/ + + /** + * @param boolean $isBigEndian + * @param string $mode + */ function & _getIFDEntries($isBigEndian, $mode) { $EXIFNames = $this->_exifTagNames($mode); $EXIFTags = $this->_exifNameTags($mode); @@ -2487,6 +2515,10 @@ function & _createMarkerAdobe() { } /*************************************************************/ + + /** + * @param integer $pos + */ function _write8BIM(&$data, $pos, $type, $header, &$value) { $signature = "8BIM"; @@ -2547,6 +2579,10 @@ function & _writeIPTC() { } /*************************************************************/ + + /** + * @param integer $pos + */ function _writeIPTCEntry(&$data, $pos, $type, &$value) { $pos = $this->_putShort($data, $pos, 0x1C02); $pos = $this->_putByte($data, $pos, $type); @@ -2907,11 +2943,19 @@ function _names2Tags($tags2Names) { } /*************************************************************/ + + /** + * @param integer $pos + */ function _getByte(&$data, $pos) { return ord($data{$pos}); } /*************************************************************/ + + /** + * @param integer $pos + */ function _putByte(&$data, $pos, $val) { $val = intval($val); @@ -2947,6 +2991,10 @@ function _putShort(&$data, $pos = 0, $val = 0, $bigEndian = true) { } /*************************************************************/ + + /** + * @param integer $pos + */ function _getLong(&$data, $pos, $bigEndian = true) { if ($bigEndian) { return (ord($data{$pos}) << 24) @@ -2962,6 +3010,10 @@ function _getLong(&$data, $pos, $bigEndian = true) { } /*************************************************************/ + + /** + * @param integer $pos + */ function _putLong(&$data, $pos, $val, $bigEndian = true) { $val = intval($val); diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 731c198282..b8e2de82ae 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -21,6 +21,9 @@ function Doku_Handler() { $this->CallWriter = new Doku_Handler_CallWriter($this); } + /** + * @param string $handler + */ function _addCall($handler, $args, $pos) { $call = array($handler,$args, $pos); $this->CallWriter->writeCall($call); @@ -133,6 +136,9 @@ function hr($match, $state, $pos) { return true; } + /** + * @param string $name + */ function _nestingTag($match, $state, $pos, $name) { switch ( $state ) { case DOKU_LEXER_ENTER: diff --git a/inc/parser/parser.php b/inc/parser/parser.php index df01f3302f..5f86cf5c4e 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -61,6 +61,9 @@ class Doku_Parser { var $connected = false; + /** + * @param Doku_Parser_Mode_base $BaseMode + */ function addBaseMode(& $BaseMode) { $this->modes['base'] =& $BaseMode; if ( !$this->Lexer ) { @@ -139,6 +142,7 @@ public function getSort(); /** * Called before any calls to connectTo + * @return void */ function preConnect(); @@ -146,11 +150,13 @@ function preConnect(); * Connects the mode * * @param string $mode + * @return void */ function connectTo($mode); /** * Called after all calls to connectTo + * @return void */ function postConnect(); @@ -407,6 +413,9 @@ class Doku_Parser_Mode_formatting extends Doku_Parser_Mode { ), ); + /** + * @param string $type + */ function Doku_Parser_Mode_formatting($type) { global $PARSER_MODES; diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index 9df96389a5..e1eade8d4c 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -106,6 +106,9 @@ public function testLineSplit(){ class auth_plugin_authplainharness extends auth_plugin_authplain { + /** + * @param boolean $bool + */ public function setPregsplit_safe($bool) { $this->_pregsplit_safe = $bool; } @@ -114,6 +117,9 @@ public function getPregsplit_safe(){ return $this->_pregsplit_safe; } + /** + * @param string $line + */ public function splitUserData($line){ return $this->_splitUserData($line); }