GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#153)
by joseph
16:42
created

AbstractEntityCreationUuidDto   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 25
rs 10
c 0
b 0
f 0
ccs 0
cts 12
cp 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getEntityFqn() 0 3 1
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\DataTransferObjects;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Factories\UuidFactory;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Interfaces\DataTransferObjectInterface;
7
use Ramsey\Uuid\UuidInterface;
8
9
/**
10
 * Extend from this class when making small anonymous DTO classes
11
 *
12
 * This version will generate an ordered time Uuid which should be used for Entities that implement (the default)
13
 * \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\UuidFieldTrait
14
 */
15
abstract class AbstractEntityCreationUuidDto implements DataTransferObjectInterface
16
{
17
    /**
18
     * @var string
19
     */
20
    private static $entityFqn;
21
    /**
22
     * @var UuidInterface
23
     */
24
    private $id;
25
26
    public function __construct(string $entityFqn, UuidFactory $idFactory)
27
    {
28
        self::$entityFqn = $entityFqn;
29
        $this->id        = $entityFqn::buildUuid($idFactory);
30
    }
31
32
    public static function getEntityFqn(): string
33
    {
34
        return self::$entityFqn;
35
    }
36
37
    public function getId(): UuidInterface
38
    {
39
        return $this->id;
40
    }
41
}
42