Completed
Push — develop ( 5f7df1...9cb564 )
by Matteo
10s
created

DiffChunkLineChanged::getNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * GitElephant - An abstraction layer for git written in PHP
4
 * Copyright (C) 2013  Matteo Giachino
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program.  If not, see [http://www.gnu.org/licenses/].
18
 */
19
20
namespace GitElephant\Objects\Diff;
21
22
/**
23
 * A changed line in the DiffChunk
24
 *
25
 * @author Mathias Geat <[email protected]>
26
 */
27
abstract class DiffChunkLineChanged extends DiffChunkLine
28
{
29
    /**
30
     * Line number
31
     *
32
     * @var int
33
     */
34
    protected $number;
35
36
    /**
37
     * Set line number
38
     *
39
     * @param int $number line number
40
     */
41 2
    public function setNumber($number)
42
    {
43 2
        $this->number = $number;
44 2
    }
45
46
    /**
47
     * Get line number
48
     *
49
     * @return int
50
     */
51
    public function getNumber()
52
    {
53
        return $this->number;
54
    }
55
56
    /**
57
     * Get origin line number
58
     *
59
     * @return int
60
     */
61
    public function getOriginNumber()
62
    {
63
        return $this->getNumber();
64
    }
65
66
    /**
67
     * Get destination line number
68
     *
69
     * @return int
70
     */
71
    public function getDestNumber()
72
    {
73
        return $this->getNumber();
74
    }
75
}
76