From 21e71ce05b9d5273eb6dfa84407227fd1c1b0875 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Mon, 14 Oct 2024 17:52:16 +1300 Subject: [PATCH] DOC Document correct method signature for DB::require_table --- src/ORM/Connect/DBSchemaManager.php | 1 + src/ORM/DB.php | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ORM/Connect/DBSchemaManager.php b/src/ORM/Connect/DBSchemaManager.php index 449333e4a..948e2084d 100644 --- a/src/ORM/Connect/DBSchemaManager.php +++ b/src/ORM/Connect/DBSchemaManager.php @@ -358,6 +358,7 @@ abstract class DBSchemaManager * @param boolean $hasAutoIncPK A flag indicating that the primary key on this table is an autoincrement type * @param array $options Create table options (ENGINE, etc.) * @param array|bool $extensions List of extensions + * @return void */ public function requireTable( $table, diff --git a/src/ORM/DB.php b/src/ORM/DB.php index 054b858d0..d8704fc26 100644 --- a/src/ORM/DB.php +++ b/src/ORM/DB.php @@ -550,15 +550,16 @@ class DB * as necessary. * * @param string $table The name of the table - * @param string $fieldSchema A list of the fields to create, in the same form as DataObject::$db - * @param string $indexSchema A list of indexes to create. The keys of the array are the names of the index. + * @param array $fieldSchema A list of the fields to create, in the same form as DataObject::$db + * @param array $indexSchema A list of indexes to create. See {@link requireIndex()} * The values of the array can be one of: * - true: Create a single column index on the field named the same as the index. - * - array('fields' => array('A','B','C'), 'type' => 'index/unique/fulltext'): This gives you full + * - ['fields' => ['A','B','C'], 'type' => 'index/unique/fulltext']: This gives you full * control over the index. * @param boolean $hasAutoIncPK A flag indicating that the primary key on this table is an autoincrement type - * @param string $options SQL statement to append to the CREATE TABLE call. - * @param array $extensions List of extensions + * @param array $options Create table options (ENGINE, etc.) + * @param array|bool $extensions List of extensions + * @return void */ public static function require_table( $table,