Test Failed
Push — master ( 389090...91c650 )
by Ryuichi
02:53
created

InvalidArgumentException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
namespace WebStream\Exception\Extend;
3
4
use WebStream\Exception\SystemException;
5
6
/**
7
 * InvalidArgumentException
8
 * @author Ryuichi TANAKA.
9
 * @since 2014/05/06
10
 * @version 0.4
11
 */
12
class InvalidArgumentException extends SystemException
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...validArgumentException>, 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