diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2022-06-18 11:38:26 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2022-06-18 11:38:26 +0200 |
commit | 0e42a12a33b9bb193fa7851628edf018bd922362 (patch) | |
tree | f01c0f82d0d8399f9c502d769c8e182e3b6df153 /includes/admin/register_db_tables.php | |
parent | c0ff4d1d2ca7e4226d718bf11a636f431c470fe6 (diff) | |
download | gigologadmin-0e42a12a33b9bb193fa7851628edf018bd922362.tar.gz gigologadmin-0e42a12a33b9bb193fa7851628edf018bd922362.tar.bz2 gigologadmin-0e42a12a33b9bb193fa7851628edf018bd922362.zip |
Add phpcs config and do automatic fixups.
Diffstat (limited to 'includes/admin/register_db_tables.php')
-rw-r--r-- | includes/admin/register_db_tables.php | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/includes/admin/register_db_tables.php b/includes/admin/register_db_tables.php index ce0f25c..5f83e25 100644 --- a/includes/admin/register_db_tables.php +++ b/includes/admin/register_db_tables.php @@ -4,16 +4,14 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -if ( !function_exists( "giglog_register_db_tables") ) -{ +if ( ! function_exists( 'giglog_register_db_tables' ) ) { /** * Registers the tables used by the GiglogAdmin plugin */ - function giglog_register_db_tables() : void - { + function giglog_register_db_tables() : void { global $wpdb; - $tables = []; + $tables = array(); $tables[] = "CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}giglogadmin_venues` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -45,11 +43,10 @@ if ( !function_exists( "giglog_register_db_tables") ) REFERENCES `{$wpdb->prefix}giglogadmin_venues` (`id`) ON DELETE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; - - foreach($tables as $tabledef) { - $result = $wpdb->query($tabledef); - if ($result === false) { - error_log("Registering table failed."); + foreach ( $tables as $tabledef ) { + $result = $wpdb->query( $tabledef ); + if ( $result === false ) { + error_log( 'Registering table failed.' ); } } } |