r69000 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68999‎ | r69000 | r69001 >
Date:14:41, 4 July 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -850,8 +850,8 @@
851851 * For internal calls. Use fieldInfo for normal usage.
852852 * Returns false if the field doesn't exist
853853 *
854 - * @param Array $table
855 - * @param String $field
 854+ * @param $table Array
 855+ * @param $field String
856856 */
857857 private function fieldInfoMulti( $table, $field ) {
858858 $tableWhere = '';
Index: trunk/phase3/includes/db/Database.php
@@ -971,12 +971,12 @@
972972 * so use sparingly
973973 * Takes same arguments as Database::select()
974974 *
975 - * @param string $table table name
976 - * @param array $vars unused
977 - * @param array $conds filters on the table
978 - * @param string $fname function name for profiling
979 - * @param array $options options for select
980 - * @return int row count
 975+ * @param $table String: table name
 976+ * @param $vars Array: unused
 977+ * @param $conds Array: filters on the table
 978+ * @param $fname String: function name for profiling
 979+ * @param $options Array: options for select
 980+ * @return Integer: row count
981981 */
982982 public function estimateRowCount( $table, $vars='*', $conds='', $fname = 'Database::estimateRowCount', $options = array() ) {
983983 $rows = 0;
@@ -1017,10 +1017,11 @@
10181018
10191019 /**
10201020 * Determines whether a field exists in a table
1021 - * @param $table: table name
1022 - * @param $filed: filed to check on that table
1023 - * @param $fname: calling function name (optional)
1024 - * @return bool: whether $table has filed $field
 1021+ *
 1022+ * @param $table String: table name
 1023+ * @param $field String: filed to check on that table
 1024+ * @param $fname String: calling function name (optional)
 1025+ * @return Boolean: whether $table has filed $field
10251026 */
10261027 function fieldExists( $table, $field, $fname = 'Database::fieldExists' ) {
10271028 $info = $this->fieldInfo( $table, $field );
@@ -1267,10 +1268,10 @@
12681269 * Build a partial where clause from a 2-d array such as used for LinkBatch.
12691270 * The keys on each level may be either integers or strings.
12701271 *
1271 - * @param array $data organized as 2-d array(baseKeyVal => array(subKeyVal => <ignored>, ...), ...)
1272 - * @param string $baseKey field name to match the base-level keys to (eg 'pl_namespace')
1273 - * @param string $subKey field name to match the sub-level keys to (eg 'pl_title')
1274 - * @return mixed string SQL fragment, or false if no items in array.
 1272+ * @param $data Array: organized as 2-d array(baseKeyVal => array(subKeyVal => <ignored>, ...), ...)
 1273+ * @param $baseKey String: field name to match the base-level keys to (eg 'pl_namespace')
 1274+ * @param $subKey String: field name to match the sub-level keys to (eg 'pl_title')
 1275+ * @return Mixed: string SQL fragment, or false if no items in array.
12751276 */
12761277 function makeWhereFrom2d( $data, $baseKey, $subKey ) {
12771278 $conds = array();
@@ -2021,6 +2022,7 @@
20222023 * @param $oldName String: name of table whose structure should be copied
20232024 * @param $newName String: name of table to be created
20242025 * @param $temporary Boolean: whether the new table should be temporary
 2026+ * @param $fname String: calling function name
20252027 * @return Boolean: true if operation was successful
20262028 */
20272029 function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = 'Database::duplicateTableStructure' ) {
@@ -2313,9 +2315,10 @@
23142316 * Abstracted from Filestore::lock() so child classes can implement for
23152317 * their own needs.
23162318 *
2317 - * @param $lockName String: Name of lock to aquire
2318 - * @param $method String: Name of method calling us
2319 - * @return bool
 2319+ * @param $lockName String: name of lock to aquire
 2320+ * @param $method String: name of method calling us
 2321+ * @param $timeout Integer: timeout
 2322+ * @return Boolean
23202323 */
23212324 public function lock( $lockName, $method, $timeout = 5 ) {
23222325 return true;
@@ -2373,7 +2376,7 @@
23742377 *
23752378 * This is a MySQL-specific feature.
23762379 *
2377 - * @param mixed $value true for allow, false for deny, or "default" to restore the initial value
 2380+ * @param $value Mixed: true for allow, false for deny, or "default" to restore the initial value
23782381 */
23792382 public function setBigSelects( $value = true ) {
23802383 // no-op
@@ -2770,7 +2773,6 @@
27712774 * Fields can be retrieved with $row->fieldname, with fields acting like
27722775 * member variables.
27732776 *
2774 - * @param $res SQL result object as returned from Database::query(), etc.
27752777 * @return MySQL row object
27762778 * @throws DBUnexpectedError Thrown if the database returns an error
27772779 */
@@ -2782,7 +2784,6 @@
27832785 * Fetch the next row from the given result object, in associative array
27842786 * form. Fields are retrieved with $row['fieldname'].
27852787 *
2786 - * @param $res SQL result object as returned from Database::query(), etc.
27872788 * @return MySQL row object
27882789 * @throws DBUnexpectedError Thrown if the database returns an error
27892790 */
Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -151,8 +151,9 @@
152152 /**
153153 * Attaches external database to our connection, see http://sqlite.org/lang_attach.html
154154 * for details.
155 - * @param $name: Database name to be used in queries like SELECT foo FROM dbname.table
156 - * @param $file: Database file name. If omitted, will be generated using $name and $wgSQLiteDataDir
 155+ * @param $name String: database name to be used in queries like SELECT foo FROM dbname.table
 156+ * @param $file String: database file name. If omitted, will be generated using $name and $wgSQLiteDataDir
 157+ * @param $fname String: calling function name
157158 */
158159 function attachDatabase( $name, $file = false, $fname = 'DatabaseSqlite::attachDatabase' ) {
159160 global $wgSQLiteDataDir;

Status & tagging log