Ajde_Exception::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
class Ajde_Exception extends Exception
4
{
5
    protected $_traceOnOutput = true;
6
7
    public function __construct($message = null, $code = 0, $traceOnOutput = true)
8
    {
9
        $this->_traceOnOutput = $traceOnOutput;
10
        parent::__construct($message, $code);
11
    }
12
13
    public function traceOnOutput()
14
    {
15
        return $this->_traceOnOutput;
16
    }
17
18
    public function process()
19
    {
20
        return Ajde_Exception_Handler::handler($this);
0 ignored issues
show
Documentation introduced by
$this is of type this<Ajde_Exception>, but the function expects a object<Throwable>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
21
    }
22
}
23