diff --git a/core/database.class.php b/core/database.class.php index 27037ab1..f287d0b4 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -509,7 +509,7 @@ class Database { } /** - * @return bool + * @return boolean|null * @throws SCoreException */ public function commit() { @@ -525,7 +525,7 @@ class Database { } /** - * @return bool + * @return boolean|null * @throws SCoreException */ public function rollback() { @@ -566,6 +566,10 @@ class Database { return $this->engine->name; } + /** + * @param null|PDO $db + * @param string $sql + */ private function count_execs($db, $sql, $inputarray) { if ((defined('DEBUG_SQL') && DEBUG_SQL === true) || (!defined('DEBUG_SQL') && @$_GET['DEBUG_SQL'])) { $fp = @fopen("data/sql.log", "a"); diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 0827b411..b21cbf6a 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -175,6 +175,10 @@ class Image { return $images; } + /** + * @param string[] $tags + * @return boolean + */ public function validate_accel($tags) { $yays = 0; $nays = 0; diff --git a/ext/ban_words/main.php b/ext/ban_words/main.php index 86463306..9d9493d4 100644 --- a/ext/ban_words/main.php +++ b/ext/ban_words/main.php @@ -86,6 +86,12 @@ xanax $event->panel->add_block($sb); } + /** + * Throws if the comment contains banned words. + * @param string $comment + * @param CommentPostingException|SCoreException $ex + * @throws CommentPostingException|SCoreException if the comment contains banned words. + */ private function test_text($comment, $ex) { $comment = strtolower($comment); @@ -105,6 +111,9 @@ xanax } } + /** + * @return string[] + */ private function get_words() { global $config; $words = array(); diff --git a/ext/setup/main.php b/ext/setup/main.php index 6bef9dcf..96eaff9f 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -157,6 +157,11 @@ class SetupBlock extends Block { $this->body .= "\n"; } + /** + * @param string $name + * @param string[] $options + * @param null|string $label + */ public function add_choice_option($name, $options, $label=null) { global $config; $current = $config->get_string($name); @@ -176,6 +181,11 @@ class SetupBlock extends Block { $this->body .= $html; } + /** + * @param string $name + * @param string[] $options + * @param null|string $label + */ public function add_multichoice_option($name, $options, $label=null) { global $config; $current = $config->get_array($name); diff --git a/ext/wiki/main.php b/ext/wiki/main.php index 80837510..cd61a1e4 100644 --- a/ext/wiki/main.php +++ b/ext/wiki/main.php @@ -220,7 +220,7 @@ class Wiki extends Extension { /** * @param string $title - * @param int|null $revision + * @param integer $revision * @return WikiPage */ private function get_page($title, $revision=-1) { diff --git a/install.php b/install.php index 2db9cb12..1efe82ac 100644 --- a/install.php +++ b/install.php @@ -114,6 +114,9 @@ do_install(); // utilities {{{ // TODO: Can some of these be pushed into "core/util.inc.php" ? +/** + * @return int + */ function check_gd_version() { $gdversion = 0; @@ -129,6 +132,9 @@ function check_gd_version() { return $gdversion; } +/** + * @return int + */ function check_im_version() { $convert_check = exec("convert"); @@ -469,6 +475,12 @@ EOD; echo "\n"; } // }}} +/** + * @param boolean $isPDO + * @param string $errorMessage1 + * @param string $errorMessage2 + * @param integer $exitCode + */ function handle_db_errors(/*bool*/ $isPDO, /*str*/ $errorMessage1, /*str*/ $errorMessage2, /*int*/ $exitCode) { $errorMessage1Extra = ($isPDO ? "Please check and ensure that the database configuration options are all correct." : "Please check the server log files for more information."); print <<