diff --git a/Tests/Unit/Domain/Model/CouponTest.php b/Tests/Unit/Domain/Model/CouponTest.php index 27382b3e..453033ef 100644 --- a/Tests/Unit/Domain/Model/CouponTest.php +++ b/Tests/Unit/Domain/Model/CouponTest.php @@ -17,35 +17,17 @@ #[CoversClass(Coupon::class)] class CouponTest extends UnitTestCase { - /** - * @var Coupon - */ - protected $coupon; - - /** - * @var string - */ - protected $title = ''; - - /** - * @var string - */ - protected $code = ''; - - /** - * @var string - */ - protected $couponType = ''; - - /** - * @var float - */ - protected $discount = 0.0; - - /** - * @var int - */ - protected $taxClassId = 0; + protected Coupon $coupon; + + protected string $title = ''; + + protected string $code = ''; + + protected string $couponType = ''; + + protected float $discount = 0.0; + + protected int $taxClassId = 0; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/DiscountTest.php b/Tests/Unit/Domain/Model/Order/DiscountTest.php index 920743f5..36b5e3e1 100644 --- a/Tests/Unit/Domain/Model/Order/DiscountTest.php +++ b/Tests/Unit/Domain/Model/Order/DiscountTest.php @@ -18,52 +18,19 @@ #[CoversClass(Discount::class)] class DiscountTest extends UnitTestCase { - /** - * @var Discount - */ - protected $discount; - - /** - * Title - * - * @var string - */ - protected $title = ''; - - /** - * Code - * - * @var string - */ - protected $code = ''; - - /** - * Gross - * - * @var float - */ - protected $gross = 0.0; - - /** - * Net - * - * @var float - */ - protected $net = 0.0; - - /** - * TaxClass - * - * @var TaxClass - */ - protected $taxClass; - - /** - * Tax - * - * @var float - */ - protected $tax = 0.0; + protected Discount $discount; + + protected string $title = ''; + + protected string $code = ''; + + protected float $gross = 0.0; + + protected float $net = 0.0; + + protected TaxClass $taxClass; + + protected float $tax = 0.0; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/ItemTest.php b/Tests/Unit/Domain/Model/Order/ItemTest.php index 257746f0..e89e807b 100644 --- a/Tests/Unit/Domain/Model/Order/ItemTest.php +++ b/Tests/Unit/Domain/Model/Order/ItemTest.php @@ -17,15 +17,9 @@ #[CoversClass(Item::class)] class ItemTest extends UnitTestCase { - /** - * @var int - */ - protected $cartPid = 1; - - /** - * @var Item - */ - protected $item; + protected int $cartPid = 1; + + protected Item $item; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/PaymentTest.php b/Tests/Unit/Domain/Model/Order/PaymentTest.php index 079b04ba..f8079898 100644 --- a/Tests/Unit/Domain/Model/Order/PaymentTest.php +++ b/Tests/Unit/Domain/Model/Order/PaymentTest.php @@ -19,10 +19,7 @@ #[CoversClass(Payment::class)] class PaymentTest extends UnitTestCase { - /** - * @var Payment - */ - protected $payment; + protected Payment $payment; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/ProductAdditionalTest.php b/Tests/Unit/Domain/Model/Order/ProductAdditionalTest.php index d572eec9..47c2901f 100644 --- a/Tests/Unit/Domain/Model/Order/ProductAdditionalTest.php +++ b/Tests/Unit/Domain/Model/Order/ProductAdditionalTest.php @@ -17,25 +17,13 @@ #[CoversClass(ProductAdditional::class)] class ProductAdditionalTest extends UnitTestCase { - /** - * @var string - */ - protected $additionalType = ''; - - /** - * @var string - */ - protected $additionalKey = ''; - - /** - * @var string - */ - protected $additionalValue = ''; - - /** - * @var ProductAdditional - */ - protected $productAdditional; + protected string $additionalType = ''; + + protected string $additionalKey = ''; + + protected string $additionalValue = ''; + + protected ProductAdditional $productAdditional; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/ProductTest.php b/Tests/Unit/Domain/Model/Order/ProductTest.php index 2ca33080..9fe63561 100644 --- a/Tests/Unit/Domain/Model/Order/ProductTest.php +++ b/Tests/Unit/Domain/Model/Order/ProductTest.php @@ -17,25 +17,13 @@ #[CoversClass(Product::class)] class ProductTest extends UnitTestCase { - /** - * @var Product - */ - protected $product; - - /** - * @var string - */ - protected $sku; - - /** - * @var string - */ - protected $title; - - /** - * @var int - */ - protected $count = 0; + protected Product $product; + + protected string $sku; + + protected string $title; + + protected int $count = 0; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/ShippingTest.php b/Tests/Unit/Domain/Model/Order/ShippingTest.php index 212297a5..0deb9db5 100644 --- a/Tests/Unit/Domain/Model/Order/ShippingTest.php +++ b/Tests/Unit/Domain/Model/Order/ShippingTest.php @@ -17,10 +17,7 @@ #[CoversClass(Shipping::class)] class ShippingTest extends UnitTestCase { - /** - * @var Shipping - */ - protected $shipping; + protected Shipping $shipping; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/TaxClassTest.php b/Tests/Unit/Domain/Model/Order/TaxClassTest.php index ed2fd84b..86557611 100644 --- a/Tests/Unit/Domain/Model/Order/TaxClassTest.php +++ b/Tests/Unit/Domain/Model/Order/TaxClassTest.php @@ -17,25 +17,13 @@ #[CoversClass(TaxClass::class)] class TaxClassTest extends UnitTestCase { - /** - * @var TaxClass - */ - protected $taxClass; - - /** - * @var string - */ - protected $title; - - /** - * @var string - */ - protected $value; - - /** - * @var float - */ - protected $calc = 0.0; + protected TaxClass $taxClass; + + protected string $title; + + protected string $value; + + protected float $calc = 0.0; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/TaxTest.php b/Tests/Unit/Domain/Model/Order/TaxTest.php index 9aa30306..5278bd41 100644 --- a/Tests/Unit/Domain/Model/Order/TaxTest.php +++ b/Tests/Unit/Domain/Model/Order/TaxTest.php @@ -18,20 +18,11 @@ #[CoversClass(Tax::class)] class TaxTest extends UnitTestCase { - /** - * @var Tax - */ - protected $orderTax; - - /** - * @var float - */ - protected $tax; - - /** - * @var TaxClass - */ - protected $taxClass; + protected Tax $orderTax; + + protected float $tax; + + protected TaxClass $taxClass; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Order/TransactionTest.php b/Tests/Unit/Domain/Model/Order/TransactionTest.php index 8cf80d12..12f12d35 100644 --- a/Tests/Unit/Domain/Model/Order/TransactionTest.php +++ b/Tests/Unit/Domain/Model/Order/TransactionTest.php @@ -17,10 +17,7 @@ #[CoversClass(Transaction::class)] class TransactionTest extends UnitTestCase { - /** - * @var Transaction - */ - protected $transaction; + protected Transaction $transaction; public function setUp(): void { diff --git a/Tests/Unit/Domain/Model/TagTest.php b/Tests/Unit/Domain/Model/TagTest.php index c1db1a09..89a36a46 100644 --- a/Tests/Unit/Domain/Model/TagTest.php +++ b/Tests/Unit/Domain/Model/TagTest.php @@ -17,15 +17,9 @@ #[CoversClass(Tag::class)] class TagTest extends UnitTestCase { - /** - * @var Tag - */ - protected $tag; + protected Tag $tag; - /** - * @var string - */ - protected $title = ''; + protected string $title = ''; public function setUp(): void { diff --git a/Tests/Unit/Validation/Validator/EmptyValidatorTest.php b/Tests/Unit/Validation/Validator/EmptyValidatorTest.php index 6cd1ed4d..d9a202ba 100644 --- a/Tests/Unit/Validation/Validator/EmptyValidatorTest.php +++ b/Tests/Unit/Validation/Validator/EmptyValidatorTest.php @@ -17,30 +17,22 @@ #[CoversClass(EmptyValidator::class)] class EmptyValidatorTest extends UnitTestCase { - /** - * @var string - */ - protected $validatorClassName = EmptyValidator::class; + protected string $validatorClassName = EmptyValidator::class; - /** - * @var ValidatorInterface - */ - protected $validator; + protected ValidatorInterface $validator; /** * @param array $options - * @return mixed */ - protected function getValidator($options = []) + protected function getValidator(array $options = []): ValidatorInterface { - $validator = new $this->validatorClassName($options); - return $validator; + return new $this->validatorClassName($options); } /** * @param array $options */ - protected function validatorOptions($options) + protected function validatorOptions(array $options): void { $this->validator = $this->getValidator($options); }