Completed
Pull Request — master (#164)
by Pascal
09:52
created

ParsedComment::getLine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Gettext\Utils;
4
5
/**
6
 * Comment parsed by PhpFunctionsScanner.
7
 */
8
class ParsedComment
9
{
10
    /**
11
     * The comment itself.
12
     *
13
     * @var string
14
     */
15
    protected $comment;
16
17
    /**
18
     * The line where the function starts.
19
     *
20
     * @var int
21
     */
22
    protected $line;
23
24
    /**
25
     * Initializes the instance.
26
     *
27
     * @param string $comment The comment itself.
28
     * @param int    $line The line where the comment starts.
29
     */
30
    public function __construct($comment, $line)
31
    {
32
        $this->comment = $comment;
33
        $this->line = $line;
34
    }
35
36
	/**
37
	 * Return the comment's line number.
38
	 *
39
	 * @return int Line number.
40
	 */
41
	public function getLine()
42
	{
43
		return $this->line;
44
    }
45
46
	/**
47
	 * Return the actual comment string.
48
	 *
49
	 * @return string The comment.
50
	 */
51
	public function getComment()
52
	{
53
		return $this->comment;
54
    }
55
}
56