SourceLocation::getLine()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Fubhy\GraphQL\Language;
4
5
/**
6
 * Represents a location in a Source.
7
 */
8
class SourceLocation
9
{
10
    /**
11
     * @var int
12
     */
13
    protected $line;
14
15
    /**
16
     * @var int
17
     */
18
    protected $column;
19
20
    /**
21
     * Constructor.
22
     *
23
     * @param int $line
24
     * @param int $column
25
     */
26
    public function __construct($line, $column)
27
    {
28
        $this->line = $line;
29
        $this->column = $column;
30
    }
31
32
    /**
33
     * @return int
34
     */
35
    public function getLine()
36
    {
37
        return $this->line;
38
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getColumn()
44
    {
45
        return $this->column;
46
    }
47
}
48