Passed
Push — master ( 4b5a85...fa5906 )
by Rustam
02:30
created

ParameterConfig::hasType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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