Test Failed
Push — master ( d89333...e2d202 )
by Alexey
03:26
created

NotFoundException::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

Importance

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