Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Document correct method signature for DB::require_table #11425

Open
wants to merge 1 commit into
base: 5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ORM/Connect/DBSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ protected function transInitTable($table)
* @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,
Expand Down
11 changes: 6 additions & 5 deletions src/ORM/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,16 @@ public static function create_field($table, $field, $spec)
* 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|null A list of the fields to create, in the same form as DataObject::$db
* @param array $indexSchema|null A list of indexes to create. See {@link require_index()}
Comment on lines +553 to +554
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param array $fieldSchema|null A list of the fields to create, in the same form as DataObject::$db
* @param array $indexSchema|null A list of indexes to create. See {@link require_index()}
* @param array|null $fieldSchema A list of the fields to create, in the same form as DataObject::$db
* @param array|null $indexSchema A list of indexes to create. See {@link require_index()}

* 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|null $options Create table options (ENGINE, etc.)
* @param array|bool|null $extensions List of extensions
* @return void
*/
public static function require_table(
$table,
Expand Down