SingleTable::__construct()   A
last analyzed

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 Spiral\Attributes\NamedArgumentConstructor;
9
10
/**
11
 * @Annotation
12
 * @NamedArgumentConstructor
13
 * @Target("CLASS")
14
 */
15
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
16
class SingleTable extends Inheritance
17
{
18 144
    public function __construct(
19
        private ?string $value = null
20
    ) {
21 144
        parent::__construct('single');
22 144
    }
23
24 144
    public function getValue(): ?string
25
    {
26 144
        return $this->value;
27
    }
28
}
29