TypeConfig::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 3
Bugs 1 Features 0
Metric Value
cc 1
eloc 0
nc 1
nop 2
dl 0
loc 16
ccs 1
cts 1
cp 1
crap 1
rs 10
c 3
b 1
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Proxy\Config;
6
7
/**
8
 * @internal
9
 *
10
 * A type metadata. {@see ClassConfigFactory} is used for creation. Can be used both for method parameters' types and
11
 * return type.
12
 *
13
 * @link https://www.php.net/manual/en/language.types.declarations.php
14
 */
15
final class TypeConfig
16
{
17 11
    public function __construct(
18
        /**
19
         * @var string The string representation of a type, for example: `int`, `bool`, etc. In case of a class it's a
20
         * full path including namespace, for example `Yiisoft\Proxy\Tests\Stub\Node`. For built-in classes like
21
         * `ArrayIterator` the leading slash is not included.
22
         *
23
         * @link https://www.php.net/manual/en/language.types.declarations.php
24
         */
25
        public string $name,
26
        /**
27
         * @var bool Whether the null values are allowed.
28
         *
29
         * @link https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.nullable-types
30
         */
31
        public bool $allowsNull,
32
    ) {
33 11
    }
34
}
35