UnsupportedFeatureException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 16
ccs 7
cts 7
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace LWI\DeliveryTracking\Exception;
4
5
use \Exception;
6
7
/**
8
 * UnsupportedFeatureException
9
 *
10
 * Used when a method or a feature is not supported by the delivery service used.
11
 */
12
class UnsupportedFeatureException extends Exception
13
{
14
    /**
15
     * UnsupportedFeature constructor.
16
     * @param string $functionName
17
     * @param string $adapter
18
     */
19 9
    public function __construct($functionName, $adapter = '')
20
    {
21 9
        parent::__construct(sprintf(
22 9
            'The feature "%s" is not supported by this adapter%s.',
23 6
            $functionName,
24 9
            $adapter ? ' ('.$adapter.')' : ''
25 6
        ));
26 9
    }
27
}
28