EmbedParser::tryContinue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the league/commonmark package.
7
 *
8
 * (c) Colin O'Dell <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace League\CommonMark\Extension\Embed;
15
16
use League\CommonMark\Node\Block\AbstractBlock;
17
use League\CommonMark\Parser\Block\BlockContinue;
18
use League\CommonMark\Parser\Block\BlockContinueParserInterface;
19
use League\CommonMark\Parser\Cursor;
20
21
class EmbedParser implements BlockContinueParserInterface
22
{
23
    private Embed $embed;
24
25 14
    public function __construct(string $url)
26
    {
27 14
        $this->embed = new Embed($url);
28
    }
29
30 14
    public function getBlock(): AbstractBlock
31
    {
32 14
        return $this->embed;
33
    }
34
35 14
    public function isContainer(): bool
36
    {
37 14
        return false;
38
    }
39
40 6
    public function canHaveLazyContinuationLines(): bool
41
    {
42 6
        return false;
43
    }
44
45 2
    public function canContain(AbstractBlock $childBlock): bool
46
    {
47 2
        return false;
48
    }
49
50 10
    public function tryContinue(Cursor $cursor, BlockContinueParserInterface $activeBlockParser): ?BlockContinue
51
    {
52 10
        return BlockContinue::none();
53
    }
54
55 12
    public function addLine(string $line): void
56
    {
57 12
    }
58
59 12
    public function closeBlock(): void
60
    {
61 12
    }
62
}
63