Completed
Push — 1.0 ( 2156a0...733517 )
by Valentin
07:09
created

ObjectNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
crap 1
1
<?php
2
3
/*
4
 * This file is part of Transfer.
5
 *
6
 * For the full copyright and license information, please view the LICENSE file located
7
 * in the root directory.
8
 */
9
10
namespace Transfer\EzPlatform\Exception;
11
12
use eZ\Publish\API\Repository\Exceptions\NotFoundException;
13
14
/**
15
 * Exception class for cases when.
16
 */
17
class ObjectNotFoundException extends NotFoundException
18
{
19
    /**
20
     * ObjectNotFoundException constructor.
21
     *
22
     * @param string   $class
23
     * @param string[] $identifiers
24
     */
25 34
    public function __construct($class, array $identifiers)
26
    {
27 34
        parent::__construct(sprintf(
28 34
            '%s not found. Checked with identifier(s): %s.',
29 34
            $class,
30 34
            implode('", "', $identifiers)
31 34
        ));
32 34
    }
33
}
34