InputTypeHint   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 16
c 0
b 0
f 0
wmc 4
lcom 0
cbo 4
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A method() 0 6 2
A function() 0 6 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Marcosh\PhpTypeChecker\TypeHint;
6
7
use Roave\BetterReflection\Reflection\ReflectionFunction;
8
use Roave\BetterReflection\Reflection\ReflectionMethod;
9
10
final class InputTypeHint
11
{
12
    public static function method(ReflectionMethod $method): \Iterator
13
    {
14
        foreach ($method->getParameters() as $parameter) {
15
            yield from MethodParamTypeHint::param($parameter);
16
        }
17
    }
18
19
    public static function function(ReflectionFunction $function): \Iterator
20
    {
21
        foreach ($function->getParameters() as $parameter) {
22
            yield from FunctionParamTypeHint::param($parameter);
23
        }
24
    }
25
}
26