Completed
Push — master ( 7a0a03...73b89e )
by Colin
02:28
created

BlockQuote::isCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <[email protected]>
7
 *
8
 * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
9
 *  - (c) John MacFarlane
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace League\CommonMark\Extension\CommonMark\Node\Block;
16
17
use League\CommonMark\Node\Block\AbstractBlock;
18
use League\CommonMark\Parser\Cursor;
19
20
/**
21
 * @method children() AbstractBlock[]
22
 */
23
class BlockQuote extends AbstractBlock
24
{
25 141
    public function canContain(AbstractBlock $block): bool
26
    {
27 141
        return true;
28
    }
29
30 147
    public function isCode(): bool
31
    {
32 147
        return false;
33
    }
34
35 99
    public function matchesNextLine(Cursor $cursor): bool
36
    {
37 99
        if (!$cursor->isIndented() && $cursor->getNextNonSpaceCharacter() === '>') {
38 51
            $cursor->advanceToNextNonSpaceOrTab();
39 51
            $cursor->advanceBy(1);
40 51
            $cursor->advanceBySpaceOrTab();
41
42 51
            return true;
43
        }
44
45 66
        return false;
46
    }
47
48 123
    public function shouldLastLineBeBlank(Cursor $cursor, int $currentLineNumber): bool
49
    {
50 123
        return false;
51
    }
52
}
53