Completed
Push — master ( e1e275...3d6629 )
by Martin
20:32
created

TableCaption   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

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
namespace Webuni\CommonMark\TableExtension;
4
5
use League\CommonMark\Block\Element\AbstractBlock;
6
use League\CommonMark\Block\Element\InlineContainer;
7
use League\CommonMark\Cursor;
8
9
class TableCaption extends AbstractBlock implements InlineContainer
10
{
11
    public $id;
12
13
    public function __construct($caption, $id = null)
14
    {
15
        parent::__construct();
16
        $this->finalStringContents = $caption;
17
        $this->id = $id;
18
    }
19
20
    public function canContain(AbstractBlock $block)
21
    {
22
        return false;
23
    }
24
25
    public function acceptsLines()
26
    {
27
        return false;
28
    }
29
30
    public function isCode()
31
    {
32
        return false;
33
    }
34
35
    public function matchesNextLine(Cursor $cursor)
36
    {
37
        return false;
38
    }
39
}
40