OptionalParameterResolver   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 8
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Habemus\Autowiring\Parameter;
5
6
use ReflectionParameter;
7
8
class OptionalParameterResolver implements ParameterResolver
9
{
10
    /**
11
     * @inheritDoc
12
     */
13
    public function resolve(ReflectionParameter $parameter, array $arguments, array &$result): bool
14
    {
15
        return $parameter->isOptional();
16
    }
17
}
18