AbstractType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getDescription() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Andi\GraphQL\Type;
6
7
use Andi\GraphQL\Definition\Type\TypeInterface;
8
9
abstract class AbstractType implements TypeInterface
10
{
11
    protected string $name;
12
13
    protected string $description;
14
15 2
    public function getName(): string
16
    {
17 2
        return $this->name;
18
    }
19
20 2
    public function getDescription(): ?string
21
    {
22
        /** @psalm-suppress RedundantPropertyInitializationCheck */
23 2
        return $this->description ?? null;
24
    }
25
}
26