Location   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 45.45%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 55
ccs 5
cts 11
cp 0.4545
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getStart() 0 4 1
A getEnd() 0 4 1
A getSource() 0 4 1
1
<?php
2
3
namespace Fubhy\GraphQL\Language;
4
5
/**
6
 * Contains a range of UTF-8 character offsets that identify the region of the
7
 * source from which the AST derived.
8
 */
9
class Location
10
{
11
    /**
12
     * @var int
13
     */
14
    protected $start;
15
16
    /**
17
     * @var int
18
     */
19
    protected $end;
20
21
    /**
22
     * @var \Fubhy\GraphQL\Language\Source|null
23
     */
24
    public $source;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param $start
30
     * @param $end
31
     * @param \Fubhy\GraphQL\Language\Source|null $source
32
     */
33 309
    public function __construct($start, $end, Source $source = NULL)
34
    {
35 309
        $this->start = $start;
36 309
        $this->end = $end;
37 309
        $this->source = $source;
38 309
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getStart()
44
    {
45
        return $this->start;
46
    }
47
48
    /**
49
     * @return int
50
     */
51
    public function getEnd()
52
    {
53
        return $this->end;
54
    }
55
56
    /**
57
     * @return Source|null
58
     */
59
    public function getSource()
60
    {
61
        return $this->source;
62
    }
63
}
64