DefaultValueArgument   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDefaultValue() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace League\Container\Argument;
6
7
class DefaultValueArgument extends ResolvableArgument implements DefaultValueInterface
8
{
9
    protected $defaultValue;
10
11 27
    public function __construct(string $value, $defaultValue = null)
12
    {
13 27
        $this->defaultValue = $defaultValue;
14 27
        parent::__construct($value);
15
    }
16
17
    /**
18
     * @return mixed|null
19
     */
20 6
    public function getDefaultValue()
21
    {
22 6
        return $this->defaultValue;
23
    }
24
}
25