Passed
Push — master ( 20e747...679572 )
by Ivan
01:59
created

UnsupportedItemClassException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Everlution\Navigation\Factory\Build;
6
7
/**
8
 * Class UnsupportedItemClassException.
9
 * @author Ivan Barlog <[email protected]>
10
 */
11
class UnsupportedItemClassException extends \InvalidArgumentException
12
{
13
    public function __construct(string $class, array $supportedClasses)
14
    {
15
        parent::__construct(
16
            sprintf(
17
                "Cannot create object of type '%s'. Supported classes: %s.
18
                Did you forget to specify supported classes within config() method?",
19
                $class,
20
                implode(', ', $supportedClasses)
21
            )
22
        );
23
    }
24
}
25