1 | <?php |
||
21 | final class Location |
||
22 | { |
||
23 | /** @var int */ |
||
24 | private $lineNumber = 0; |
||
25 | |||
26 | /** @var int */ |
||
27 | private $columnNumber = 0; |
||
28 | |||
29 | /** |
||
30 | * Initializes the location for an element using its line number in the file and optionally the column number. |
||
31 | */ |
||
32 | public function __construct(int $lineNumber, int $columnNumber = 0) |
||
37 | |||
38 | /** |
||
39 | * Returns the line number that is covered by this location. |
||
40 | */ |
||
41 | public function getLineNumber() : int |
||
45 | |||
46 | /** |
||
47 | * Returns the column number (character position on a line) for this location object. |
||
48 | */ |
||
49 | public function getColumnNumber() : int |
||
53 | } |
||
54 |