[ticket/17507] Minor code fixes

PHPBB-17507
This commit is contained in:
rxu 2025-07-09 11:59:53 +07:00
parent 69a4990b2b
commit b9dbce21f7
No known key found for this signature in database
GPG key ID: 8117904FEDEFDD17

View file

@ -96,7 +96,7 @@ class doctrine implements tools_interface
*/ */
protected function get_schema(): Schema protected function get_schema(): Schema
{ {
return $this->get_schema_manager()->introspectSchema(); return $this->get_schema_manager()->introspectSchema();
} }
/** /**
@ -645,7 +645,7 @@ class doctrine implements tools_interface
? [$table_data['PRIMARY_KEY']] ? [$table_data['PRIMARY_KEY']]
: $table_data['PRIMARY_KEY']; : $table_data['PRIMARY_KEY'];
$table->setPrimaryKey($table_data['PRIMARY_KEY'], false); $table->setPrimaryKey($table_data['PRIMARY_KEY']);
} }
if (array_key_exists('KEYS', $table_data)) if (array_key_exists('KEYS', $table_data))
@ -807,7 +807,7 @@ class doctrine implements tools_interface
$this->alter_table( $this->alter_table(
$schema, $schema,
$table_name, $table_name,
function (Table $table) use (&$schema, $table_name, $column_name, $safe_check): void function (Table $table) use ($schema, $table_name, $column_name, $safe_check): void
{ {
if ($safe_check && !$table->hasColumn($column_name)) if ($safe_check && !$table->hasColumn($column_name))
{ {