Passed
Push — 3.x ( 080893...4e5cb3 )
by Aleksei
09:48
created

SingleTable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\Annotated\Annotation\Inheritance;
6
7
use Cycle\Annotated\Annotation\Inheritance;
8
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
9
10
/**
11
 * @Annotation
12
 * @NamedArgumentConstructor
13
 * @Target("CLASS")
14
 */
15
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
16
class SingleTable extends Inheritance
17
{
18 36
    public function __construct(
19
        private ?string $value = null
20
    ) {
21 36
        parent::__construct('single');
22 36
    }
23
24 36
    public function getValue(): ?string
25
    {
26 36
        return $this->value;
27
    }
28
}
29