DataNotFoundException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2
Metric Value
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 4
nc 1
nop 1
crap 2
1
<?php
2
3
namespace LWI\DeliveryTracking\Exception;
4
5
use \Exception;
6
7
/**
8
 * DataNotFoundException
9
 *
10
 * Used when the requested data for a delivery os not found.
11
 */
12
class DataNotFoundException extends Exception
13
{
14
    /**
15
     * DataNotFoundException constructor.
16
     * @param string $adapter
17
     */
18 9
    public function __construct($adapter = '')
19
    {
20 9
        parent::__construct(sprintf(
21 9
            'The requested data has not been found by this adapter%s.',
22 9
            $adapter ? ' ('.$adapter.')' : ''
23 6
        ));
24 9
    }
25
}
26