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

TableCaption   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 31
ccs 0
cts 22
cp 0
rs 10
c 1
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A canContain() 0 4 1
A acceptsLines() 0 4 1
A isCode() 0 4 1
A matchesNextLine() 0 4 1
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