`DatabaseName` and `TableName` should be used for `$db` and `$table`
#17 727 ouverte le 17 sept. 2022
Métriques du dépôt
- Stars
- (6 886 étoiles)
- Métriques de merge PR
- (Merge moyen 2j 17h) (11 PRs mergées en 30 j)
Description
The PhpMyAdmin\Dbal\DatabaseName and PhpMyAdmin\Dbal\TableName classes should be used as a type for the database and table names instead of using plain strings.
- public function foo(string $db, string $table)
+ public function foo(DatabaseName $db, TableName $table)
The current database and table names can also be got as strings using the Current::$database and Current::$table static properties of the class PhpMyAdmin\Current. These should be using the value objects as well.
- $db = Current::$database;
+ $db = DatabaseName::fromValue(Current::$database);
If you're willing to work on this, you don't need to change all cases before opening a pull request, you can change a small piece of code, test if it's working and then open a pull request. That will make your PR easier to review and merge.