Passed
Branch master (fc5382)
by Fabian
03:13
created

AbstractException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
dl 0
loc 10
ccs 0
cts 5
cp 0
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace LE_ACME2\Exception;
4
5
use LE_ACME2\Utilities;
6
7
abstract class AbstractException extends \Exception {
8
9
    public function __construct(string $message) {
10
11
        Utilities\Logger::getInstance()->add(
0 ignored issues
show
Bug introduced by
It seems like add() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
        Utilities\Logger::getInstance()->/** @scrutinizer ignore-call */ add(
Loading history...
12
            Utilities\Logger::LEVEL_DEBUG,
13
            'Exception "' . get_called_class() . '" thrown '
14
        );
15
16
        parent::__construct($message);
17
    }
18
}