Passed
Pull Request — master (#36)
by
unknown
02:45 queued 35s
created

ParameterConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 16
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A hasType() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Proxy\Config;
6
7
final class ParameterConfig
8
{
9 5
    public function __construct(
10
        public ?TypeConfig $type,
11
        public string $name,
12
        public bool $allowsNull,
13
        public bool $isDefaultValueAvailable,
14
        public ?bool $isDefaultValueConstant,
15
        public ?string $defaultValueConstantName,
16
        public mixed $defaultValue,
17
    ) {
18
    }
19
20 3
    public function hasType(): bool
21
    {
22 3
        return $this->type !== null;
23
    }
24
}
25