Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
| OrderLine | |
100.00% |
3 / 3 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Apie\IntegrationTests\Apie\TypeDemo\Entities; |
| 4 | |
| 5 | use Apie\Core\Entities\EntityInterface; |
| 6 | use Apie\Core\ValueObjects\NonEmptyString; |
| 7 | use Apie\IntegrationTests\Apie\TypeDemo\Identifiers\OrderLineIdentifier; |
| 8 | |
| 9 | class OrderLine implements EntityInterface |
| 10 | { |
| 11 | private OrderLineIdentifier $id; |
| 12 | |
| 13 | public function __construct(private NonEmptyString $description) |
| 14 | { |
| 15 | $this->id = OrderLineIdentifier::createRandom(); |
| 16 | } |
| 17 | |
| 18 | public function getId(): OrderLineIdentifier |
| 19 | { |
| 20 | return $this->id; |
| 21 | } |
| 22 | |
| 23 | public function getDescription(): NonEmptyString |
| 24 | { |
| 25 | return $this->description; |
| 26 | } |
| 27 | } |