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

Conversation

maxime-rainville
Copy link
Contributor

The method signature for DB::require_table is wrong and should match the one from DBSchemaManager::requireTable.

I've documented the return type for both method while I was in there.

Parent issue

src/ORM/DB.php Outdated
Comment on lines 553 to 554
* @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()}
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 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()}
* @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 requireIndex()}

null is the default value for these parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

Oops, looks like you put the null in the wrong place.

src/ORM/DB.php Outdated Show resolved Hide resolved
src/ORM/DB.php Outdated Show resolved Hide resolved
src/ORM/DB.php Outdated Show resolved Hide resolved
Comment on lines +553 to +554
* @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()}
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()}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants