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
Push — master ( 84892e...749633 )
by joseph
25:37 queued 22:57
created

IntegerIdFieldTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 19
rs 10
c 0
b 0
f 0
ccs 9
cts 9
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A metaForId() 0 7 1
A getId() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey;
4
5
use Doctrine\DBAL\Types\Type;
6
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
7
8
trait IntegerIdFieldTrait
9
{
10
    /**
11
     * @var int|null
12
     */
13
    private $id;
14
15 2
    protected static function metaForId(ClassMetadataBuilder $builder): void
16
    {
17 2
        $builder->createField('id', Type::INTEGER)
18 2
                ->makePrimaryKey()
19 2
                ->nullable(false)
20 2
                ->generatedValue('IDENTITY')
21 2
                ->build();
22 2
    }
23
24 2
    public function getId(): ?int
25
    {
26 2
        return $this->id;
27
    }
28
}
29