Passed
Push — 2.3 ( 32a49e )
by Colin
03:51 queued 01:09
created

EmbedParser::canHaveLazyContinuationLines()   A

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 0
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 10
    public function __construct(string $url)
26
    {
27 10
        $this->embed = new Embed($url);
28
    }
29
30 10
    public function getBlock(): AbstractBlock
31
    {
32 10
        return $this->embed;
33
    }
34
35 10
    public function isContainer(): bool
36
    {
37 10
        return false;
38
    }
39
40 4
    public function canHaveLazyContinuationLines(): bool
41
    {
42 4
        return false;
43
    }
44
45 2
    public function canContain(AbstractBlock $childBlock): bool
46
    {
47 2
        return false;
48
    }
49
50 6
    public function tryContinue(Cursor $cursor, BlockContinueParserInterface $activeBlockParser): ?BlockContinue
51
    {
52 6
        return BlockContinue::none();
53
    }
54
55
    public function addLine(string $line): void
56
    {
57
    }
58
59
    public function closeBlock(): void
60
    {
61
    }
62
}
63