Completed
Pull Request — master (#1184)
by Alexey
12:56
created

UnrecognizedToken   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 38
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getColumn() 0 3 1
1
<?php
2
/**
3
 * Hoa
4
 *
5
 *
6
 * @license
7
 *
8
 * BSD 3-Clause License
9
 *
10
 * Copyright © 2007-2017, Hoa community. All rights reserved.
11
 *
12
 * Redistribution and use in source and binary forms, with or without
13
 * modification, are permitted provided that the following conditions are met:
14
 *
15
 * 1. Redistributions of source code must retain the above copyright notice, this
16
 *    list of conditions and the following disclaimer.
17
 *
18
 * 2. Redistributions in binary form must reproduce the above copyright notice,
19
 *    this list of conditions and the following disclaimer in the documentation
20
 *    and/or other materials provided with the distribution.
21
 *
22
 * 3. Neither the name of the copyright holder nor the names of its
23
 *    contributors may be used to endorse or promote products derived from
24
 *    this software without specific prior written permission.
25
 *
26
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
 *
37
 */
38
39
namespace JMS\Serializer\Type\Compiler\Exception;
40
41
/**
42
 * Class \JMS\Serializer\Type\Compiler\Exception\UnrecognizedToken.
43
 *
44
 * Extending the \JMS\Serializer\Type\Compiler\Exception class.
45
 *
46
 * @copyright  Copyright © 2007-2017 Hoa community
47
 * @license    New BSD License
48
 */
49
class UnrecognizedToken extends Exception
0 ignored issues
show
Deprecated Code introduced by
The class JMS\Serializer\Type\Compiler\Exception\Exception has been deprecated: alias ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

49
class UnrecognizedToken extends /** @scrutinizer ignore-deprecated */ Exception
Loading history...
50
{
51
    /**
52
     * Column.
53
     *
54
     * @var int
55
     */
56
    protected $column = 0;
57
58
59
60
    /**
61
     * Override line and add column support.
62
     *
63
     * @param   string  $message    Formatted message.
64
     * @param   int     $code       Code (the ID).
65
     * @param   array   $arg        RaiseError string arguments.
66
     * @param   int     $line       Line.
67
     * @param   int     $column     Column.
68
     */
69
    public function __construct($message, $code, $arg, $line, $column)
70
    {
71
        parent::__construct($message, $code, $arg);
72
73
        $this->line   = $line;
74
        $this->column = $column;
75
76
        return;
77
    }
78
79
    /**
80
     * Get column.
81
     *
82
     * @return  int
83
     */
84
    public function getColumn()
85
    {
86
        return $this->column;
87
    }
88
}
89