Footnote   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
dl 0
loc 19
ccs 6
cts 6
cp 1
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getReference() 0 3 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\Block\AbstractBlock;
18
use League\CommonMark\Reference\ReferenceInterface;
19
use League\CommonMark\Reference\ReferenceableInterface;
20
21
final class Footnote extends AbstractBlock implements ReferenceableInterface
22
{
23
    /**
24
     * @var ReferenceInterface
25
     *
26
     * @psalm-readonly
27
     */
28
    private $reference;
29
30 108
    public function __construct(ReferenceInterface $reference)
31
    {
32 108
        parent::__construct();
33
34 108
        $this->reference = $reference;
35 108
    }
36
37 108
    public function getReference(): ReferenceInterface
38
    {
39 108
        return $this->reference;
40
    }
41
}
42