FootnoteBackref::getReference()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <[email protected]>
7
 * (c) Rezo Zero / Ambroise Maupate
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
declare(strict_types=1);
14
15
namespace League\CommonMark\Extension\Footnote\Node;
16
17
use League\CommonMark\Node\Inline\AbstractInline;
18
use League\CommonMark\Reference\ReferenceInterface;
19
use League\CommonMark\Reference\ReferenceableInterface;
20
21
/**
22
 * Link from the footnote on the bottom of the document back to the reference
23
 */
24
final class FootnoteBackref extends AbstractInline implements ReferenceableInterface
25
{
26
    /**
27
     * @var ReferenceInterface
28
     *
29
     * @psalm-readonly
30
     */
31
    private $reference;
32
33 105
    public function __construct(ReferenceInterface $reference)
34
    {
35 105
        parent::__construct();
36
37 105
        $this->reference = $reference;
38 105
    }
39
40 105
    public function getReference(): ReferenceInterface
41
    {
42 105
        return $this->reference;
43
    }
44
}
45