throwUnsupportedFeatureException()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace LWI\DeliveryTracking\Behavior;
4
5
use LWI\DeliveryTracking\Exception\DataNotFoundException;
6
use LWI\DeliveryTracking\Exception\UnsupportedFeatureException;
7
8
/**
9
 * Class ExceptionThrower
10
 */
11
trait ExceptionThrower
12
{
13
    /**
14
     * @throws UnsupportedFeatureException
15
     */
16
    public function throwUnsupportedFeatureException()
17
    {
18
        throw new UnsupportedFeatureException(__FUNCTION__, (new \ReflectionClass($this))->getShortName());
19
    }
20
21
    /**
22
     * @throws DataNotFoundException
23
     */
24
    public function throwDataNotFoundException()
25
    {
26
        throw new DataNotFoundException((new \ReflectionClass($this))->getShortName());
27
    }
28
}
29