Passed
Push — master ( 2c1367...72194f )
by Alexey
03:21
created

UninstantiableServiceException::createMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1.0527

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 8
cp 0.625
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 1.0527
1
<?php declare(strict_types = 1);
2
3
namespace Venta\Container\Exception;
4
5
use Exception;
6
7
/**
8
 * Class UninstantiableServiceException
9
 *
10
 * @package Venta\Container\Exception
11
 */
12
class UninstantiableServiceException extends ContainerException
13
{
14
    /**
15
     * @inheritDoc
16
     */
17 1
    protected function createMessage(Exception $previous = null): string
18
    {
19 1
        return sprintf(
20 1
            'Unable to instantiate "%s" service, path: "%s".',
21 1
            $this->serviceId(),
22 1
            implode(' -> ', $this->referenceChain())
23
        );
24
    }
25
}