TableCaption   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 38.46%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 30
ccs 5
cts 13
cp 0.3846
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A canContain() 0 4 1
A isCode() 0 4 1
A matchesNextLine() 0 4 1
A handleRemainingContents() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This is part of the league/commonmark-ext-table package.
7
 *
8
 * (c) Martin Hasoň <[email protected]>
9
 * (c) Webuni s.r.o. <[email protected]>
10
 * (c) Colin O'Dell <[email protected]>
11
 *
12
 * For the full copyright and license information, please view the LICENSE
13
 * file that was distributed with this source code.
14
 */
15
16
namespace League\CommonMark\Ext\Table;
17
18
use League\CommonMark\Block\Element\AbstractBlock;
19
use League\CommonMark\Block\Element\AbstractStringContainerBlock;
20
use League\CommonMark\Block\Element\InlineContainerInterface;
21
use League\CommonMark\ContextInterface;
22
use League\CommonMark\Cursor;
23
24
class TableCaption extends AbstractStringContainerBlock implements InlineContainerInterface
25
{
26
    public $id;
27
28 4
    public function __construct(string $caption, string $id = null)
29
    {
30 4
        parent::__construct();
31 4
        $this->finalStringContents = $caption;
32 4
        $this->id = $id;
33 4
    }
34
35
    public function canContain(AbstractBlock $block): bool
36
    {
37
        return false;
38
    }
39
40
    public function isCode(): bool
41
    {
42
        return false;
43
    }
44
45
    public function matchesNextLine(Cursor $cursor): bool
46
    {
47
        return false;
48
    }
49
50
    public function handleRemainingContents(ContextInterface $context, Cursor $cursor): void
51
    {
52
    }
53
}
54

 

OSZAR »