Confusing parameter name $classes #6573

Open
opened 2026-01-22 15:35:12 +01:00 by admin · 2 comments
Owner

Originally created by @mvorisek on GitHub (Dec 2, 2020).

See SchemaTool::getUpdateSchemaSql(array $classes) method.

$classes represents array of ClassMetadata, no string class names.

Originally created by @mvorisek on GitHub (Dec 2, 2020). See `SchemaTool::getUpdateSchemaSql(array $classes)` method. `$classes` represents array of `ClassMetadata`, no string class names.
Author
Owner

@greg0ire commented on GitHub (Dec 3, 2020):

Indeed: 404edd418b/lib/Doctrine/ORM/Tools/SchemaTool.php (L882-L905)

404edd418b/lib/Doctrine/ORM/Tools/SchemaTool.php (L137-L161)

The phpdoc could also be improved by using @psalm-param ClassMetadata[] $classes. Please send a PR.

@greg0ire commented on GitHub (Dec 3, 2020): Indeed: https://github.com/doctrine/orm/blob/404edd418b983d14a35c62ab297a4ead66ed2063/lib/Doctrine/ORM/Tools/SchemaTool.php#L882-L905 https://github.com/doctrine/orm/blob/404edd418b983d14a35c62ab297a4ead66ed2063/lib/Doctrine/ORM/Tools/SchemaTool.php#L137-L161 The phpdoc could also be improved by using `@psalm-param ClassMetadata[] $classes`. Please send a PR.
Author
Owner

@mvorisek commented on GitHub (Dec 3, 2020):

I also advice to rename the params to $metadatas as used in other method prototypes.

@mvorisek commented on GitHub (Dec 3, 2020): I also advice to rename the params to `$metadatas` as used in other method prototypes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6573