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.

DoctrineEntity   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 18
c 2
b 0
f 0
dl 0
loc 47
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getNullableValue() 0 3 1
A loadMetadata() 0 8 1
A __construct() 0 10 1
A getStringValue() 0 3 1
A getIntValue() 0 3 1
1
<?php
2
declare(strict_types=1);
3
namespace Thunder\Platenum\Tests\Fake;
4
5
use Doctrine\ORM\Mapping\ClassMetadata;
6
use Thunder\Platenum\Enum\ConstantsEnumTrait;
7
8
final class DoctrineEntity
9
{
10
    private $id;
11
    private $intValue;
12
    private $stringValue;
13
    private $nullableValue;
14
15
    public function __construct(
16
        int $id,
17
        DoctrineIntEnum $int,
18
        DoctrineStringEnum $string,
19
        ?DoctrineStringEnum $nullableString = null
20
    ) {
21
        $this->id = $id;
22
        $this->intValue = $int;
23
        $this->stringValue = $string;
24
        $this->nullableValue = $nullableString;
25
    }
26
27
    public static function loadMetadata(ClassMetadata $metadata)
28
    {
29
        $metadata->setPrimaryTable(['name' => 'doctrine_entity']);
30
31
        $metadata->mapField(['id' => true, 'fieldName' => 'id', 'type' => 'integer']);
32
        $metadata->mapField(['fieldName' => 'intValue', 'columnName' => 'int_value', 'type' => 'intEnum']);
33
        $metadata->mapField(['fieldName' => 'stringValue', 'columnName' => 'string_value', 'type' => 'stringEnum']);
34
        $metadata->mapField(['fieldName' => 'nullableValue', 'columnName' => 'nullable_value', 'type' => 'stringEnum', 'nullable' => true]);
35
    }
36
37
    public function getId()
38
    {
39
        return $this->id;
40
    }
41
42
    public function getIntValue(): DoctrineIntEnum
43
    {
44
        return $this->intValue;
45
    }
46
47
    public function getStringValue(): DoctrineStringEnum
48
    {
49
        return $this->stringValue;
50
    }
51
52
    public function getNullableValue(): ?DoctrineStringEnum
53
    {
54
        return $this->nullableValue;
55
    }
56
}
57