InvalidFactoryException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Container package.
5
 *
6
 * Copyright (c) Miloš Đurić <[email protected]>
7
 *
8
 * For full copyright and license information, please refer to the LICENSE file,
9
 * located at the package root folder.
10
 */
11
12
namespace Laganica\Di\Exception;
13
14
/**
15
 * Class InvalidFactoryException
16
 *
17
 * @package Laganica\Di\Exception
18
 */
19
class InvalidFactoryException extends ContainerException
20
{
21
    /**
22
     * @param string $factoryClass
23
     * @param string $factoryInterface
24
     *
25
     * @return self
26
     */
27 1
    public static function create(string $factoryClass, string $factoryInterface): self
28
    {
29 1
        return new self("$factoryClass must implement $factoryInterface");
30
    }
31
}
32