Passed
Push — master ( b9d3d9...292a4d )
by Michal
03:26
created

LoaderException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 1
1
<?php
2
3
/**
4
 * Exception thrown by the lexer.
5
 */
6
7
namespace PhpMyAdmin\SqlParser\Exceptions;
8
9
/**
10
 * Exception thrown by the lexer.
11
 *
12
 * @category   Exceptions
13
 *
14
 * @license    https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
15
 */
16
class LoaderException extends \Exception
17
{
18
    /**
19
     * The failed load name.
20
     *
21
     * @var string
22
     */
23
    public $name;
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param string $msg  the message of this exception
29
     * @param string $ch   the character that produced this exception
0 ignored issues
show
Bug introduced by
There is no parameter named $ch. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
30
     * @param int    $pos  the position of the character
0 ignored issues
show
Bug introduced by
There is no parameter named $pos. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
31
     * @param int    $code the code of this error
32
     */
33 2
    public function __construct($msg = '', $name = '', $code = 0)
34
    {
35 2
        parent::__construct($msg, $code);
36 2
        $this->name = $name;
37 2
    }
38
}
39