Add some PHPdoc comments as suggested by Scrutinizier
This commit is contained in:
parent
c379420a1f
commit
17307820e8
@ -509,7 +509,7 @@ class Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return boolean|null
|
||||||
* @throws SCoreException
|
* @throws SCoreException
|
||||||
*/
|
*/
|
||||||
public function commit() {
|
public function commit() {
|
||||||
@ -525,7 +525,7 @@ class Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return boolean|null
|
||||||
* @throws SCoreException
|
* @throws SCoreException
|
||||||
*/
|
*/
|
||||||
public function rollback() {
|
public function rollback() {
|
||||||
@ -566,6 +566,10 @@ class Database {
|
|||||||
return $this->engine->name;
|
return $this->engine->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param null|PDO $db
|
||||||
|
* @param string $sql
|
||||||
|
*/
|
||||||
private function count_execs($db, $sql, $inputarray) {
|
private function count_execs($db, $sql, $inputarray) {
|
||||||
if ((defined('DEBUG_SQL') && DEBUG_SQL === true) || (!defined('DEBUG_SQL') && @$_GET['DEBUG_SQL'])) {
|
if ((defined('DEBUG_SQL') && DEBUG_SQL === true) || (!defined('DEBUG_SQL') && @$_GET['DEBUG_SQL'])) {
|
||||||
$fp = @fopen("data/sql.log", "a");
|
$fp = @fopen("data/sql.log", "a");
|
||||||
|
@ -175,6 +175,10 @@ class Image {
|
|||||||
return $images;
|
return $images;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string[] $tags
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
public function validate_accel($tags) {
|
public function validate_accel($tags) {
|
||||||
$yays = 0;
|
$yays = 0;
|
||||||
$nays = 0;
|
$nays = 0;
|
||||||
|
@ -86,6 +86,12 @@ xanax
|
|||||||
$event->panel->add_block($sb);
|
$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) {
|
private function test_text($comment, $ex) {
|
||||||
$comment = strtolower($comment);
|
$comment = strtolower($comment);
|
||||||
|
|
||||||
@ -105,6 +111,9 @@ xanax
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
private function get_words() {
|
private function get_words() {
|
||||||
global $config;
|
global $config;
|
||||||
$words = array();
|
$words = array();
|
||||||
|
@ -157,6 +157,11 @@ class SetupBlock extends Block {
|
|||||||
$this->body .= "<input type='hidden' name='_type_$name' value='int'>\n";
|
$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) {
|
public function add_choice_option($name, $options, $label=null) {
|
||||||
global $config;
|
global $config;
|
||||||
$current = $config->get_string($name);
|
$current = $config->get_string($name);
|
||||||
@ -176,6 +181,11 @@ class SetupBlock extends Block {
|
|||||||
$this->body .= $html;
|
$this->body .= $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
* @param string[] $options
|
||||||
|
* @param null|string $label
|
||||||
|
*/
|
||||||
public function add_multichoice_option($name, $options, $label=null) {
|
public function add_multichoice_option($name, $options, $label=null) {
|
||||||
global $config;
|
global $config;
|
||||||
$current = $config->get_array($name);
|
$current = $config->get_array($name);
|
||||||
|
@ -220,7 +220,7 @@ class Wiki extends Extension {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $title
|
* @param string $title
|
||||||
* @param int|null $revision
|
* @param integer $revision
|
||||||
* @return WikiPage
|
* @return WikiPage
|
||||||
*/
|
*/
|
||||||
private function get_page($title, $revision=-1) {
|
private function get_page($title, $revision=-1) {
|
||||||
|
12
install.php
12
install.php
@ -114,6 +114,9 @@ do_install();
|
|||||||
// utilities {{{
|
// utilities {{{
|
||||||
// TODO: Can some of these be pushed into "core/util.inc.php" ?
|
// TODO: Can some of these be pushed into "core/util.inc.php" ?
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
function check_gd_version() {
|
function check_gd_version() {
|
||||||
$gdversion = 0;
|
$gdversion = 0;
|
||||||
|
|
||||||
@ -129,6 +132,9 @@ function check_gd_version() {
|
|||||||
return $gdversion;
|
return $gdversion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
function check_im_version() {
|
function check_im_version() {
|
||||||
$convert_check = exec("convert");
|
$convert_check = exec("convert");
|
||||||
|
|
||||||
@ -469,6 +475,12 @@ EOD;
|
|||||||
echo "\n";
|
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) {
|
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.");
|
$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
|
print <<<EOD
|
||||||
|
@ -242,7 +242,7 @@ EOD;
|
|||||||
/**
|
/**
|
||||||
* @param string $link
|
* @param string $link
|
||||||
* @param null|string $desc
|
* @param null|string $desc
|
||||||
* @param array $pages_matched
|
* @param string[] $pages_matched
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function navlinks($link, $desc, $pages_matched) {
|
public function navlinks($link, $desc, $pages_matched) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user