From 30ce2392507145788523710dd26af0fc11fb7397 Mon Sep 17 00:00:00 2001
From: Christopher Georg <christopher.georg@sr-travel.de>
Date: Sat, 4 Feb 2023 15:40:28 +0100
Subject: [PATCH] feat: modernise, drop support for php < 7.4, migrate tests
 and config for phpUnit 9, replace travis with github actions

---
 composer.json                          |  2 +-
 tests/AbstractPhysicalQuantityTest.php | 19 ++++++-------------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/composer.json b/composer.json
index 15e22cd..0652ddb 100644
--- a/composer.json
+++ b/composer.json
@@ -32,7 +32,7 @@
 
     "require-dev": {
         "phpunit/phpunit":           "^9.5",
-        "squizlabs/php_codesniffer": "^2.8.1"
+        "squizlabs/php_codesniffer": "^3.7"
     },
 
     "replace": {
diff --git a/tests/AbstractPhysicalQuantityTest.php b/tests/AbstractPhysicalQuantityTest.php
index d424f1b..239e364 100644
--- a/tests/AbstractPhysicalQuantityTest.php
+++ b/tests/AbstractPhysicalQuantityTest.php
@@ -111,8 +111,7 @@ public function testConvertToUnknownUnitThrowsException(
         AbstractPhysicalQuantity $value,
         $arbitraryUnit,
         $valueInArbitraryUnit
-    ): void
-    {
+    ): void {
         $this->expectException(\PhpUnitsOfMeasure\Exception\UnknownUnitOfMeasure::class);
         $value->toUnit('someUnknownUnit');
     }
@@ -125,8 +124,7 @@ public function testUnitConvertsToArbitraryUnit(
         AbstractPhysicalQuantity $value,
         $arbitraryUnit,
         $valueInArbitraryUnit
-    ): void
-    {
+    ): void {
         $this->assertSame($valueInArbitraryUnit, $value->toUnit($arbitraryUnit));
     }
 
@@ -146,8 +144,7 @@ public function testSerialize(
         AbstractPhysicalQuantity $value,
         $arbitraryUnit,
         $valueInArbitraryUnit
-    ): void
-    {
+    ): void {
         serialize($value);
     }
 
@@ -158,8 +155,7 @@ public function testUnserialize(
         AbstractPhysicalQuantity $value,
         $arbitraryUnit,
         $valueInArbitraryUnit
-    ): void
-    {
+    ): void {
         $unserializedValue = unserialize(serialize($value));
 
         $this->assertSame($valueInArbitraryUnit, $unserializedValue->toUnit($arbitraryUnit));
@@ -175,8 +171,7 @@ public function testAdd(
         AbstractPhysicalQuantity $secondValue,
         $sumString,
         $diffString
-    ): void
-    {
+    ): void {
         if ($shouldThrowException) {
             $this->expectException(PhysicalQuantityMismatch::class);
         }
@@ -198,11 +193,9 @@ public function testSubtract(
         AbstractPhysicalQuantity $secondValue,
         $sumString,
         $diffString
-    ): void
-    {
+    ): void {
         if ($shouldThrowException) {
             $this->expectException(PhysicalQuantityMismatch::class);
-
         }
 
         $difference = $firstValue->subtract($secondValue);