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

AbstractException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 8
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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
}