From 781a7ee009a1e9a993b5ee639ea1b1144a718623 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Wed, 22 May 2024 15:40:12 +0000 Subject: [PATCH] Apply Rector changes (CI) --- tests/Stubs/ActiveRecord/Category.php | 2 +- tests/Stubs/ActiveRecord/Customer.php | 6 +++--- tests/Stubs/ActiveRecord/CustomerClosureField.php | 6 +++--- tests/Stubs/ActiveRecord/CustomerForArrayable.php | 6 +++--- tests/Stubs/ActiveRecord/CustomerWithAlias.php | 10 +++++----- tests/Stubs/ActiveRecord/CustomerWithConstructor.php | 6 +++--- tests/Stubs/ActiveRecord/NullValues.php | 8 ++++---- tests/Stubs/ActiveRecord/Order.php | 2 +- tests/Stubs/ActiveRecord/OrderItemWithNullFK.php | 4 ++-- tests/Stubs/ActiveRecord/OrderWithNullFK.php | 2 +- tests/Stubs/ActiveRecord/Type.php | 4 ++-- tests/Stubs/ActiveRecord/UserAR.php | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/Stubs/ActiveRecord/Category.php b/tests/Stubs/ActiveRecord/Category.php index 49e4c1561..bc85de046 100644 --- a/tests/Stubs/ActiveRecord/Category.php +++ b/tests/Stubs/ActiveRecord/Category.php @@ -16,7 +16,7 @@ */ final class Category extends ActiveRecord { - protected int|null $id; + protected int|null $id = null; protected string $name; public function getTableName(): string diff --git a/tests/Stubs/ActiveRecord/Customer.php b/tests/Stubs/ActiveRecord/Customer.php index 13b768fca..ef527fc36 100644 --- a/tests/Stubs/ActiveRecord/Customer.php +++ b/tests/Stubs/ActiveRecord/Customer.php @@ -18,11 +18,11 @@ class Customer extends ActiveRecord protected int $id; protected string $email; - protected string|null $name; - protected string|null $address; + protected string|null $name = null; + protected string|null $address = null; protected int|null $status = 0; protected bool|string|null $bool_status = false; - protected int|null $profile_id; + protected int|null $profile_id = null; /** * @var int|string diff --git a/tests/Stubs/ActiveRecord/CustomerClosureField.php b/tests/Stubs/ActiveRecord/CustomerClosureField.php index d99ef987e..f53951de7 100644 --- a/tests/Stubs/ActiveRecord/CustomerClosureField.php +++ b/tests/Stubs/ActiveRecord/CustomerClosureField.php @@ -13,11 +13,11 @@ final class CustomerClosureField extends ActiveRecord { protected int $id; protected string $email; - protected string|null $name; - protected string|null $address; + protected string|null $name = null; + protected string|null $address = null; protected int|null $status = 0; protected bool|string|null $bool_status = false; - protected int|null $profile_id; + protected int|null $profile_id = null; public function getTableName(): string { diff --git a/tests/Stubs/ActiveRecord/CustomerForArrayable.php b/tests/Stubs/ActiveRecord/CustomerForArrayable.php index 35861a607..3011e3ff1 100644 --- a/tests/Stubs/ActiveRecord/CustomerForArrayable.php +++ b/tests/Stubs/ActiveRecord/CustomerForArrayable.php @@ -17,11 +17,11 @@ class CustomerForArrayable extends ActiveRecord protected int $id; protected string $email; - protected string|null $name; - protected string|null $address; + protected string|null $name = null; + protected string|null $address = null; protected int|null $status = 0; protected bool|string|null $bool_status = false; - protected int|null $profile_id; + protected int|null $profile_id = null; public function getTableName(): string { diff --git a/tests/Stubs/ActiveRecord/CustomerWithAlias.php b/tests/Stubs/ActiveRecord/CustomerWithAlias.php index cfc5ff8e3..91e36afbc 100644 --- a/tests/Stubs/ActiveRecord/CustomerWithAlias.php +++ b/tests/Stubs/ActiveRecord/CustomerWithAlias.php @@ -21,11 +21,11 @@ final class CustomerWithAlias extends ActiveRecord public int $id; public string $email; - public string|null $name; - public string|null $address; - public int|null $status; - public bool|string|null $bool_status; - public int|null $profile_id; + public string|null $name = null; + public string|null $address = null; + public int|null $status = null; + public bool|string|null $bool_status = null; + public int|null $profile_id = null; public function getTableName(): string { diff --git a/tests/Stubs/ActiveRecord/CustomerWithConstructor.php b/tests/Stubs/ActiveRecord/CustomerWithConstructor.php index b94471659..32baa4035 100644 --- a/tests/Stubs/ActiveRecord/CustomerWithConstructor.php +++ b/tests/Stubs/ActiveRecord/CustomerWithConstructor.php @@ -17,11 +17,11 @@ final class CustomerWithConstructor extends ActiveRecord { protected int $id; protected string $email; - protected string|null $name; - protected string|null $address; + protected string|null $name = null; + protected string|null $address = null; protected int|null $status = 0; protected bool|string|null $bool_status = false; - protected int|null $profile_id; + protected int|null $profile_id = null; public function __construct(ConnectionInterface $db, private Aliases $aliases) { diff --git a/tests/Stubs/ActiveRecord/NullValues.php b/tests/Stubs/ActiveRecord/NullValues.php index 9f79f70e6..18d8a09db 100644 --- a/tests/Stubs/ActiveRecord/NullValues.php +++ b/tests/Stubs/ActiveRecord/NullValues.php @@ -18,10 +18,10 @@ final class NullValues extends ActiveRecord { public int $id; - public int|null $var1; - public int|null $var2; - public int|null $var3; - public string|null $stringcol; + public int|null $var1 = null; + public int|null $var2 = null; + public int|null $var3 = null; + public string|null $stringcol = null; public function getTableName(): string { diff --git a/tests/Stubs/ActiveRecord/Order.php b/tests/Stubs/ActiveRecord/Order.php index 8d2eb6763..3078d6589 100644 --- a/tests/Stubs/ActiveRecord/Order.php +++ b/tests/Stubs/ActiveRecord/Order.php @@ -20,7 +20,7 @@ class Order extends ActiveRecord { public const TABLE_NAME = 'order'; - protected int|null $id; + protected int|null $id = null; protected int $customer_id; protected int $created_at; protected float $total; diff --git a/tests/Stubs/ActiveRecord/OrderItemWithNullFK.php b/tests/Stubs/ActiveRecord/OrderItemWithNullFK.php index 24c07fc84..a0b4c96a4 100644 --- a/tests/Stubs/ActiveRecord/OrderItemWithNullFK.php +++ b/tests/Stubs/ActiveRecord/OrderItemWithNullFK.php @@ -16,8 +16,8 @@ */ final class OrderItemWithNullFK extends ActiveRecord { - protected int|null $order_id; - protected int|null $item_id; + protected int|null $order_id = null; + protected int|null $item_id = null; protected int $quantity; protected float $subtotal; diff --git a/tests/Stubs/ActiveRecord/OrderWithNullFK.php b/tests/Stubs/ActiveRecord/OrderWithNullFK.php index acd10dd97..9d0cb7aa1 100644 --- a/tests/Stubs/ActiveRecord/OrderWithNullFK.php +++ b/tests/Stubs/ActiveRecord/OrderWithNullFK.php @@ -17,7 +17,7 @@ final class OrderWithNullFK extends ActiveRecord { protected int $id; - protected int|null $customer_id; + protected int|null $customer_id = null; protected int $created_at; protected float $total; diff --git a/tests/Stubs/ActiveRecord/Type.php b/tests/Stubs/ActiveRecord/Type.php index 79c26b0a9..4b4c873ae 100644 --- a/tests/Stubs/ActiveRecord/Type.php +++ b/tests/Stubs/ActiveRecord/Type.php @@ -33,7 +33,7 @@ class Type extends ActiveRecord public int|null $smallint_col = 1; public string $char_col; public string|null $char_col2 = 'something'; - public string|null $char_col3; + public string|null $char_col3 = null; public float $float_col; public float|null $float_col2 = 1.23; public mixed $blob_col; @@ -43,7 +43,7 @@ class Type extends ActiveRecord public bool|int|string|null $bool_col2 = true; public string|Expression $ts_default; public int|string $bit_col = 0b1000_0010; - public array|null $json_col; + public array|null $json_col = null; public function getTableName(): string { diff --git a/tests/Stubs/ActiveRecord/UserAR.php b/tests/Stubs/ActiveRecord/UserAR.php index eed0988b6..9944cab58 100644 --- a/tests/Stubs/ActiveRecord/UserAR.php +++ b/tests/Stubs/ActiveRecord/UserAR.php @@ -16,7 +16,7 @@ final class UserAR extends ActiveRecord public string $username; public string $auth_key; public string $password_hash; - public string|null $password_reset_token; + public string|null $password_reset_token = null; public string $email; public int $role = 10; public int $status = 10;