Passed
Push — master ( a4f7f2...d3cc39 )
by Melech
04:09
created

Id   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
c 0
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Orm\Data;
15
16
/**
17
 * Class Id.
18
 *
19
 * @author Melech Mizrachi
20
 */
21
readonly class Id extends Value
22
{
23
    /**
24
     * @param non-empty-string|int $value The id value
0 ignored issues
show
Documentation Bug introduced by
The doc comment non-empty-string|int at position 0 could not be parsed: Unknown type name 'non-empty-string' at position 0 in non-empty-string|int.
Loading history...
25
     * @param non-empty-string     $name  The id name
26
     */
27
    public function __construct(
28
        string|int $value,
29
        string $name = 'id',
30
    ) {
31
        parent::__construct($name, $value);
32
    }
33
}
34