Completed
Push — master ( 5f8b5c...6198ec )
by Miloš
01:17
created

InvalidFactoryException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Laganica\Di\Exception;
4
5
/**
6
 * Class InvalidFactoryException
7
 *
8
 * @package Laganica\Di\Exception
9
 */
10
class InvalidFactoryException extends ContainerException
11
{
12
    /**
13
     * @param string $factoryClass
14
     * @param string $factoryInterface
15
     *
16
     * @return self
17
     */
18 1
    public static function create(string $factoryClass, string $factoryInterface): self
19
    {
20 1
        return new self("$factoryClass must implement $factoryInterface");
21
    }
22
}
23