TypeConfig   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
eloc 1
dl 0
loc 18
ccs 1
cts 1
cp 1
rs 10
c 3
b 1
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
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