Completed
Pull Request — master (#7)
by
unknown
04:45
created

TableCaption::isCode()   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

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This is part of the webuni/commonmark-table-extension package.
5
 *
6
 * (c) Martin Hasoň <[email protected]>
7
 * (c) Webuni s.r.o. <[email protected]>
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
namespace Webuni\CommonMark\TableExtension;
14
15
use League\CommonMark\Block\Element\AbstractBlock;
16
use League\CommonMark\Block\Element\InlineContainer;
17
use League\CommonMark\Cursor;
18
19
class TableCaption extends AbstractBlock implements InlineContainer
20
{
21
    public $id;
22
23
    public function __construct($caption, $id = null)
24
    {
25
        parent::__construct();
26
        $this->finalStringContents = $caption;
27
        $this->id = $id;
28
    }
29
30
    public function canContain(AbstractBlock $block)
31
    {
32
        return false;
33
    }
34
35
    public function acceptsLines()
36
    {
37
        return false;
38
    }
39
40
    public function isCode()
41
    {
42
        return false;
43
    }
44
45
    public function matchesNextLine(Cursor $cursor)
46
    {
47
        return false;
48
    }
49
}
50