diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cf6412..ee6e413 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: PHPUnit: strategy: matrix: - php: [ 8.3, 8.4] + php: [ 8.5, 8.4] prefer-lowest: [0, 1] runs-on: ubuntu-latest name: PHP ${{ matrix.php }} - ${{ matrix.prefer-lowest == 1 && 'Lowest' || 'Latest' }} Dependencies @@ -47,4 +47,4 @@ jobs: runs-on: ubuntu-latest steps: - name: Success - run: echo "Ready to merge!" \ No newline at end of file + run: echo "Ready to merge!" diff --git a/composer.json b/composer.json index ed13c15..19c30ae 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ }, "require": { - "php": "^8.3", + "php": "^8.4", "ext-curl": "*", "ext-json": "*", "grisaia/time": "^0.2.0", diff --git a/src/DataAdapters/Entities/Counterparty/Counterparty.php b/src/DataAdapters/Entities/Counterparty/Counterparty.php index 5890f66..40785f0 100644 --- a/src/DataAdapters/Entities/Counterparty/Counterparty.php +++ b/src/DataAdapters/Entities/Counterparty/Counterparty.php @@ -13,6 +13,7 @@ { use RefTrait; use DescriptionTrait; + public function getFirstName(): string { return $this->getField('FirstName')->string(); diff --git a/src/DataAdapters/Entities/Location/SettlementAreaListItem.php b/src/DataAdapters/Entities/Location/SettlementAreaListItem.php index 2c06b21..cb78b89 100644 --- a/src/DataAdapters/Entities/Location/SettlementAreaListItem.php +++ b/src/DataAdapters/Entities/Location/SettlementAreaListItem.php @@ -12,6 +12,7 @@ { use RefTrait; use DescriptionTrait; + public function getAreaCenterRef(): string { return $this->getField('AreasCenter')->string(); diff --git a/src/DataAdapters/Entities/Location/SettlementRegionItem.php b/src/DataAdapters/Entities/Location/SettlementRegionItem.php index 2362c8d..c967587 100644 --- a/src/DataAdapters/Entities/Location/SettlementRegionItem.php +++ b/src/DataAdapters/Entities/Location/SettlementRegionItem.php @@ -12,6 +12,7 @@ { use RefTrait; use DescriptionTrait; + public function getAreaCenterRef(): string { return $this->getField('AreasCenter')->string(); diff --git a/src/DataAdapters/Enums/CounterpartyPersonType.php b/src/DataAdapters/Enums/CounterpartyPersonType.php index cf45fe5..e9edd5b 100644 --- a/src/DataAdapters/Enums/CounterpartyPersonType.php +++ b/src/DataAdapters/Enums/CounterpartyPersonType.php @@ -15,6 +15,7 @@ enum CounterpartyPersonType: string case Sender = 'Sender'; case Recipient = 'Recipient'; case ThirdPerson = 'ThirdPerson'; + public function toString(): string { return $this->value; diff --git a/src/DataAdapters/Enums/CounterpartyType.php b/src/DataAdapters/Enums/CounterpartyType.php index 1cb5652..8e05291 100644 --- a/src/DataAdapters/Enums/CounterpartyType.php +++ b/src/DataAdapters/Enums/CounterpartyType.php @@ -14,6 +14,7 @@ enum CounterpartyType: string { case PrivatePerson = 'PrivatePerson'; case Organization = 'Organization'; + public function toString(): string { return $this->value; diff --git a/src/DataAdapters/Enums/DocumentStatusCode.php b/src/DataAdapters/Enums/DocumentStatusCode.php index 6e98a1d..9b40dd6 100644 --- a/src/DataAdapters/Enums/DocumentStatusCode.php +++ b/src/DataAdapters/Enums/DocumentStatusCode.php @@ -29,6 +29,7 @@ enum DocumentStatusCode: int case ReceivedCreatedReturnDelivery = 106; case NotDeliveredNoReceiver = 111; case DeliveryTimeChanged = 112; + public function isOneOf(DocumentStatusCode ...$codes): bool { return in_array($this, $codes, true); diff --git a/src/Exception/QueryFailed/BadBodyException.php b/src/Exception/QueryFailed/BadBodyException.php index d3b405d..c7b35cf 100644 --- a/src/Exception/QueryFailed/BadBodyException.php +++ b/src/Exception/QueryFailed/BadBodyException.php @@ -6,8 +6,4 @@ final class BadBodyException extends QueryFailedException { - public function __construct(string $msg) - { - parent::__construct($msg); - } } diff --git a/src/Exception/QueryFailed/CurlException.php b/src/Exception/QueryFailed/CurlException.php index 966a44a..e79ea99 100644 --- a/src/Exception/QueryFailed/CurlException.php +++ b/src/Exception/QueryFailed/CurlException.php @@ -6,8 +6,4 @@ final class CurlException extends QueryFailedException { - public function __construct(string $msg, int $code) - { - parent::__construct($msg, $code); - } } diff --git a/src/Exception/QueryFailed/QueryFailedException.php b/src/Exception/QueryFailed/QueryFailedException.php index a0493a9..f9f8693 100644 --- a/src/Exception/QueryFailed/QueryFailedException.php +++ b/src/Exception/QueryFailed/QueryFailedException.php @@ -9,8 +9,4 @@ abstract class QueryFailedException extends Exception { - public function __construct(string $message, int $code = 0, ?Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - } }