UnknownTypeException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
4
namespace TheCodingMachine\Funky;
5
6
class UnknownTypeException extends \Exception
7
{
8
    public static function create(\ReflectionMethod $reflectionMethod): self
9
    {
10
        return new self(sprintf(
11
            'Cannot give a name to service of method %s::%s because it has no declared return type.',
12
            $reflectionMethod->getDeclaringClass()->getName(),
13
            $reflectionMethod->getName()
14
        ));
15
    }
16
}
17