diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58a25e9..5ff9b6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ 7.4, 8.0, 8.1 ] + php-version: [ 8.0, 8.1 ] steps: - name: Checkout source code diff --git a/composer.json b/composer.json index 96cd0d8..90cf7f8 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ ], "minimum-stability": "stable", "require": { - "php": "^7.4|^8.0|^8.1", - "ext-json": "*", - "complex-heart/domain-model": "^1.0.0" + "php": "^8.0.2", + "complex-heart/domain-model": "^2.0.0", + "ext-json": "*" }, "require-dev": { - "phpstan/phpstan": "^0.12.64", + "phpstan/phpstan": "^1.9.0", "pestphp/pest": "^1.4" }, "autoload": { diff --git a/src/Domain/Criteria.php b/src/Domain/Criteria.php index 8aff547..b515d05 100644 --- a/src/Domain/Criteria.php +++ b/src/Domain/Criteria.php @@ -17,11 +17,11 @@ final class Criteria implements ValueObject { use IsValueObject; - private FilterGroup $filters; + private FilterGroup $filters; // @phpstan-ignore-line - private Order $order; + private Order $order; // @phpstan-ignore-line - private Page $page; + private Page $page; // @phpstan-ignore-line /** * Criteria constructor. diff --git a/src/Domain/Filter.php b/src/Domain/Filter.php index 0873961..a240a66 100644 --- a/src/Domain/Filter.php +++ b/src/Domain/Filter.php @@ -22,21 +22,21 @@ final class Filter implements ValueObject * * @var string */ - private string $field; + private string $field; // @phpstan-ignore-line /** * The filter operator. * * @var Operator */ - private Operator $operator; + private Operator $operator; // @phpstan-ignore-line /** * The filter field value. * * @var mixed */ - private $value; + private $value; // @phpstan-ignore-line /** * Filter constructor. @@ -67,7 +67,7 @@ public static function create(string $field, Operator $operator, $value): self public static function createFromArray(array $filter): self { // check if the array is indexed or associative. - $isIndexed = fn($source): bool => !([] === $source) && array_keys($source) === range(0, count($source) - 1); + $isIndexed = fn($source): bool => ([] !== $source) && array_keys($source) === range(0, count($source) - 1); return ($isIndexed($filter)) ? self::create($filter[0], new Operator($filter[1]), $filter[2]) diff --git a/src/Domain/Order.php b/src/Domain/Order.php index 7bf99a7..941e4d2 100644 --- a/src/Domain/Order.php +++ b/src/Domain/Order.php @@ -27,7 +27,7 @@ final class Order implements ValueObject * * @var string */ - private string $by; + private string $by; // @phpstan-ignore-line /** * Used to sort the result-set in ascending or descending order. @@ -35,7 +35,7 @@ final class Order implements ValueObject * * @var string */ - private string $type; + private string $type; // @phpstan-ignore-line /** * Order constructor. diff --git a/src/Domain/Page.php b/src/Domain/Page.php index 1de56d6..fcb6f14 100644 --- a/src/Domain/Page.php +++ b/src/Domain/Page.php @@ -18,9 +18,9 @@ final class Page implements ValueObject { use IsValueObject; - private int $limit; + private int $limit; // @phpstan-ignore-line - private int $offset; + private int $offset; // @phpstan-ignore-line /** * Page constructor. @@ -62,4 +62,4 @@ public function __toString(): string { return sprintf('%s.%s', $this->limit, $this->offset); } -} \ No newline at end of file +}