Completed
Push — master ( a2735d...ef7580 )
by Edgar
03:32
created

NotImplementedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 15
ccs 10
cts 10
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A newInstance() 0 12 1
1
<?php
2
namespace nstdio\svg\xml;
3
4
/**
5
 * Class NotImplementedException
6
 *
7
 * @package nstdio\svg\xml
8
 * @author  Edgar Asatryan <[email protected]>
9
 */
10
class NotImplementedException extends \RuntimeException
11
{
12 1
    public static function newInstance()
13
    {
14 1
        $backTrack = debug_backtrace()[1];
15 1
        return new static(
16 1
            sprintf("Method %s::%s not implemented yet, but called in %s on line %d",
17 1
                $backTrack['class'],
18 1
                $backTrack['function'],
19 1
                $backTrack['file'],
20 1
                $backTrack['line']
21 1
            )
22 1
        );
23
    }
24
}