Parameter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A type() 0 4 1
A name() 0 4 1
A typeAndName() 0 4 1
A lazyCallback() 0 4 1
1
<?php
2
3
namespace Core\Utils\Parameter;
4
5
use Core\ParameterWire;
6
7
class Parameter
8
{
9
    public static function type($type)
10
    {
11
        return new ParameterTyped($type);
12
    }
13
14
    public static function name($name)
15
    {
16
        return new ParameterNamed($name);
17
    }
18
19
    public static function typeAndName($type, $name)
20
    {
21
        return new ParameterTypedAndNamed($type, $name);
22
    }
23
24
    public static function lazyCallback(callable $func)
25
    {
26
        return ParameterWire::lazyCallback($func);
27
    }
28
}
29
30
function Type($type)
31
{
32
    return Parameter::type($type);
33
}
34
35
function Name($type)
36
{
37
    return Parameter::name($type);
38
}
39
40
function TypeAndName($type, $name)
41
{
42
    return Parameter::typeAndName($type, $name);
43
}
44
45
function lazyCallback(callable $func)
46
{
47
    return Parameter::lazyCallback($func);
48
}