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
29:27
created

AbstractEntityCreationUuidDto::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 4
cp 0
crap 2
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