Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/Domain/Criteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/Domain/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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])
Expand Down
4 changes: 2 additions & 2 deletions src/Domain/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ 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.
* Ascending order by default.
*
* @var string
*/
private string $type;
private string $type; // @phpstan-ignore-line

/**
* Order constructor.
Expand Down
6 changes: 3 additions & 3 deletions src/Domain/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -62,4 +62,4 @@ public function __toString(): string
{
return sprintf('%s.%s', $this->limit, $this->offset);
}
}
}