Test Failed
Branch master (91c650)
by Ryuichi
03:38 queued 57s
created

ClassNotFoundException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __call() 0 4 1
1
<?php
2
namespace WebStream\Exception\Extend;
3
4
use WebStream\Exception\ApplicationException;
5
6
/**
7
 * ClassNotFoundException
8
 * @author Ryuichi TANAKA.
9
 * @since 2013/12/14
10
 * @version 0.4
11
 */
12
class ClassNotFoundException extends ApplicationException
13
{
14
    /**
15
     * constructor
16
     */
17
    public function __construct($message = null)
18
    {
19
        parent::__construct($message, 500, $this);
0 ignored issues
show
Documentation introduced by
$this is of type this<WebStream\Exception...ClassNotFoundException>, but the function expects a object<WebStream\Exception\Exception>|null.

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...
20
    }
21
22
    /**
23
     * method missing
24
     */
25
    public function __call($name, $arguments)
26
    {
27
        throw $this;
28
    }
29
}
30