Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
PrimitiveOnly
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\IntegrationTests\Apie\TypeDemo\Resources;
3
4use Apie\Core\Attributes\Auditable;
5use Apie\Core\Attributes\ClassStoreOptions;
6use Apie\Core\Attributes\RemovalCheck;
7use Apie\Core\Attributes\StaticCheck;
8use Apie\Core\Entities\EntityInterface;
9use Apie\Core\Enums\SortingOrder;
10use Apie\IntegrationTests\Apie\TypeDemo\Identifiers\PrimitiveOnlyIdentifier;
11
12#[Auditable(readAllEvents: true)]
13#[RemovalCheck(new StaticCheck())]
14#[ClassStoreOptions(defaultSortingOrder: SortingOrder::Ascending)]
15final class PrimitiveOnly implements EntityInterface
16{
17    public ?string $stringField = null;
18
19    public ?int $integerField = null;
20
21    public ?float $floatingPoint = null;
22
23    public ?bool $booleanField = null;
24
25    public function __construct(
26        private PrimitiveOnlyIdentifier $id
27    ) {
28    }
29
30    public function getId(): PrimitiveOnlyIdentifier
31    {
32        return $this->id;
33    }
34}