Skip to content

Commit 724ce80

Browse files
committed
Feature/Upgrade ComplexHeart Domain Model.
1 parent e3eb8fa commit 724ce80

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
php-version: [ 7.4, 8.0, 8.1 ]
15+
php-version: [ 8.0, 8.1 ]
1616

1717
steps:
1818
- name: Checkout source code

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
],
1212
"minimum-stability": "stable",
1313
"require": {
14-
"php": "^7.4|^8.0|^8.1",
15-
"ext-json": "*",
16-
"complex-heart/domain-model": "^1.0.0"
14+
"php": "^8.0.2",
15+
"complex-heart/domain-model": "^2.0.0",
16+
"ext-json": "*"
1717
},
1818
"require-dev": {
19-
"phpstan/phpstan": "^0.12.64",
19+
"phpstan/phpstan": "^1.9.0",
2020
"pestphp/pest": "^1.4"
2121
},
2222
"autoload": {

src/Domain/Criteria.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ final class Criteria implements ValueObject
1717
{
1818
use IsValueObject;
1919

20-
private FilterGroup $filters;
20+
private FilterGroup $filters; // @phpstan-ignore-line
2121

22-
private Order $order;
22+
private Order $order; // @phpstan-ignore-line
2323

24-
private Page $page;
24+
private Page $page; // @phpstan-ignore-line
2525

2626
/**
2727
* Criteria constructor.

src/Domain/Filter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ final class Filter implements ValueObject
2222
*
2323
* @var string
2424
*/
25-
private string $field;
25+
private string $field; // @phpstan-ignore-line
2626

2727
/**
2828
* The filter operator.
2929
*
3030
* @var Operator
3131
*/
32-
private Operator $operator;
32+
private Operator $operator; // @phpstan-ignore-line
3333

3434
/**
3535
* The filter field value.
3636
*
3737
* @var mixed
3838
*/
39-
private $value;
39+
private $value; // @phpstan-ignore-line
4040

4141
/**
4242
* Filter constructor.
@@ -67,7 +67,7 @@ public static function create(string $field, Operator $operator, $value): self
6767
public static function createFromArray(array $filter): self
6868
{
6969
// check if the array is indexed or associative.
70-
$isIndexed = fn($source): bool => !([] === $source) && array_keys($source) === range(0, count($source) - 1);
70+
$isIndexed = fn($source): bool => ([] !== $source) && array_keys($source) === range(0, count($source) - 1);
7171

7272
return ($isIndexed($filter))
7373
? self::create($filter[0], new Operator($filter[1]), $filter[2])

src/Domain/Order.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ final class Order implements ValueObject
2727
*
2828
* @var string
2929
*/
30-
private string $by;
30+
private string $by; // @phpstan-ignore-line
3131

3232
/**
3333
* Used to sort the result-set in ascending or descending order.
3434
* Ascending order by default.
3535
*
3636
* @var string
3737
*/
38-
private string $type;
38+
private string $type; // @phpstan-ignore-line
3939

4040
/**
4141
* Order constructor.

src/Domain/Page.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ final class Page implements ValueObject
1818
{
1919
use IsValueObject;
2020

21-
private int $limit;
21+
private int $limit; // @phpstan-ignore-line
2222

23-
private int $offset;
23+
private int $offset; // @phpstan-ignore-line
2424

2525
/**
2626
* Page constructor.
@@ -62,4 +62,4 @@ public function __toString(): string
6262
{
6363
return sprintf('%s.%s', $this->limit, $this->offset);
6464
}
65-
}
65+
}

0 commit comments

Comments
 (0)