Add some PHPdoc comments as suggested by Scrutinizier
This commit is contained in:
parent
c379420a1f
commit
17307820e8
7 changed files with 43 additions and 4 deletions
|
@ -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");
|
||||
|
|
|
@ -175,6 +175,10 @@ class Image {
|
|||
return $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $tags
|
||||
* @return boolean
|
||||
*/
|
||||
public function validate_accel($tags) {
|
||||
$yays = 0;
|
||||
$nays = 0;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -157,6 +157,11 @@ class SetupBlock extends Block {
|
|||
$this->body .= "<input type='hidden' name='_type_$name' value='int'>\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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
12
install.php
12
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 <<<EOD
|
||||
|
|
|
@ -242,7 +242,7 @@ EOD;
|
|||
/**
|
||||
* @param string $link
|
||||
* @param null|string $desc
|
||||
* @param array $pages_matched
|
||||
* @param string[] $pages_matched
|
||||
* @return null|string
|
||||
*/
|
||||
public function navlinks($link, $desc, $pages_matched) {
|
||||
|
|
Reference in a new issue