Use new code style

This commit is contained in:
David Stone
2025-02-07 19:02:33 -07:00
parent 0181024ae1
commit 8433379d90
672 changed files with 37107 additions and 45249 deletions

View File

@ -107,7 +107,5 @@ class Checkout_Form_Query extends Query {
public function __construct($query = array()) {
parent::__construct($query);
} // end __construct;
} // end class Checkout_Form_Query;
}
}

View File

@ -22,11 +22,11 @@ defined('ABSPATH') || exit;
final class Checkout_Forms_Meta_Table extends Table {
/**
* Table name
*
* @since 2.0.0
* @var string
*/
* Table name
*
* @since 2.0.0
* @var string
*/
protected $name = 'formmeta';
/**
@ -55,8 +55,7 @@ final class Checkout_Forms_Meta_Table extends Table {
public function __construct() {
parent::__construct();
} // end __construct;
}
/**
* Setup the database schema
@ -76,7 +75,5 @@ final class Checkout_Forms_Meta_Table extends Table {
PRIMARY KEY (meta_id),
KEY wu_form_id (wu_form_id),
KEY meta_key (meta_key({$max_index_length}))";
} // end set_schema;
} // end class Checkout_Forms_Meta_Table;
}
}

View File

@ -110,5 +110,4 @@ class Checkout_Forms_Schema extends Schema {
),
);
} // end class Checkout_Forms_Schema;
}

View File

@ -22,11 +22,11 @@ defined('ABSPATH') || exit;
final class Checkout_Forms_Table extends Table {
/**
* Table name
*
* @since 2.0.0
* @var string
*/
* Table name
*
* @since 2.0.0
* @var string
*/
protected $name = 'forms';
/**
@ -64,8 +64,7 @@ final class Checkout_Forms_Table extends Table {
public function __construct() {
parent::__construct();
} // end __construct;
}
/**
* Setup the database schema
@ -86,8 +85,7 @@ final class Checkout_Forms_Table extends Table {
date_created datetime DEFAULT NULL,
date_modified datetime DEFAULT NULL,
PRIMARY KEY (id)";
} // end set_schema;
}
/**
* Fixes the datetime columns to accept null.
*
@ -101,21 +99,15 @@ final class Checkout_Forms_Table extends Table {
);
foreach ($null_columns as $column) {
$query = "ALTER TABLE {$this->table_name} MODIFY COLUMN `{$column}` datetime DEFAULT NULL;";
$result = $this->get_db()->query($query);
if (!$this->is_success($result)) {
if ( ! $this->is_success($result)) {
return false;
} // end if;
} // end foreach;
}
}
return true;
} // end __20230601;
} // end class Checkout_Forms_Table;
}
}