Completed
Push — 1.5 ( fb52dd...2fb592 )
by Colin
02:48
created

Attributes::matchesNextLine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
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
 * (c) 2015 Martin Hasoň <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
declare(strict_types=1);
14
15
namespace League\CommonMark\Extension\Attributes\Node;
16
17
use League\CommonMark\Block\Element\AbstractBlock;
18
use League\CommonMark\Cursor;
19
20
final class Attributes extends AbstractBlock
21
{
22
    /** @var array<string, mixed> */
23
    private $attributes;
24
25
    /**
26
     * @param array<string, mixed> $attributes
27
     */
28 15
    public function __construct(array $attributes)
29
    {
30 15
        $this->attributes = $attributes;
31 15
    }
32
33
    /**
34
     * @return array<string, mixed>
0 ignored issues
show
Documentation introduced by
The doc-type array<string, could not be parsed: Expected ">" at position 5, but found "end of type". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
35
     */
36 15
    public function getAttributes(): array
37
    {
38 15
        return $this->attributes;
39
    }
40
41
    public function canContain(AbstractBlock $block): bool
42
    {
43
        return false;
44
    }
45
46 15
    public function isCode(): bool
47
    {
48 15
        return false;
49
    }
50
51 12
    public function matchesNextLine(Cursor $cursor): bool
52
    {
53 12
        $this->setLastLineBlank($cursor->isBlank());
54
55 12
        return false;
56
    }
57
58 15
    public function shouldLastLineBeBlank(Cursor $cursor, int $currentLineNumber): bool
59
    {
60 15
        return false;
61
    }
62
}
63