BCGArgumentException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace tinymeng\code\Gateways\barcode;
3
4
/**
5
 *--------------------------------------------------------------------
6
 *
7
 * Argument Exception
8
 *
9
 *--------------------------------------------------------------------
10
 * Copyright (C) Jean-Sebastien Goupil
11
 * http://www.barcodephp.com
12
 */
13
class BCGArgumentException extends \Exception {
14
    protected $param;
15
16
    /**
17
     * Constructor with specific message for a parameter.
18
     *
19
     * @param string $message
20
     * @param string $param
21
     */
22
    public function __construct($message, $param) {
23
        $this->param = $param;
24
        parent::__construct($message, 20000);
25
    }
26
}
27
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...