Use PHP 7.4 featers and PHP 8 polyfills

This commit is contained in:
David Stone
2025-02-08 13:57:32 -07:00
parent 8bea6067cd
commit b41dc2b2eb
550 changed files with 15270 additions and 14627 deletions

View File

@ -28,10 +28,10 @@ class Payments_Schema extends Schema {
* @access public
* @var array
*/
public $columns = array(
public $columns = [
// id
array(
[
'name' => 'id',
'type' => 'bigint',
'length' => '20',
@ -40,152 +40,152 @@ class Payments_Schema extends Schema {
'primary' => true,
'sortable' => true,
'searchable' => true,
),
],
array(
[
'name' => 'status',
'type' => 'varchar',
'length' => '12',
'default' => 'pending',
'sortable' => true,
'transition' => true,
),
],
// customer_id
array(
[
'name' => 'customer_id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'transition' => true,
),
],
array(
[
'name' => 'membership_id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'transition' => true,
),
],
array(
[
'name' => 'parent_id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'transition' => true,
'sortable' => true,
),
],
array(
[
'name' => 'product_id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'sortable' => true,
'transition' => true,
),
],
array(
[
'name' => 'migrated_from_id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'sortable' => true,
'allow_null' => true,
),
],
// currency
array(
[
'name' => 'currency',
'type' => 'varchar',
'length' => '20',
'default' => 'USD',
'sortable' => true,
),
],
array(
[
'name' => 'discount_code',
'type' => 'tinytext',
'default' => '',
'searchable' => true,
'sortable' => true,
),
],
array(
[
'name' => 'discount_total',
'type' => 'decimal(13,4)',
'default' => '',
'sortable' => true,
),
],
array(
[
'name' => 'subtotal',
'type' => 'decimal(13,4)',
'default' => '',
'sortable' => true,
'transition' => true,
),
],
array(
[
'name' => 'refund_total',
'type' => 'decimal(13,4)',
'default' => '',
'sortable' => true,
'transition' => true,
),
],
array(
[
'name' => 'tax_total',
'type' => 'decimal(13,4)',
'default' => '',
'sortable' => true,
'transition' => true,
),
],
array(
[
'name' => 'total',
'type' => 'decimal(13,4)',
'default' => '',
'sortable' => true,
'transition' => true,
),
],
// gateway
array(
[
'name' => 'gateway',
'type' => 'tinytext',
'default' => '',
'searchable' => true,
),
],
// gateway
array(
[
'name' => 'gateway_payment_id',
'type' => 'tinytext',
'default' => '',
'searchable' => true,
),
],
// date_created
array(
[
'name' => 'date_created',
'type' => 'datetime',
'created' => true,
'date_query' => true,
'sortable' => true,
'allow_null' => true,
),
],
// date_modified
array(
[
'name' => 'date_modified',
'type' => 'datetime',
'modified' => true,
'date_query' => true,
'sortable' => true,
'allow_null' => true,
),
],
);
];
}