UnknownTypeException::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
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