1<?php
2
3/*
4 * This file is part of the league/commonmark package.
5 *
6 * (c) Colin O'Dell <colinodell@gmail.com>
7 * (c) 2015 Martin Hasoň <martin.hason@gmail.com>
8 *
9 * For the full copyright and license information, please view the LICENSE
10 * file that was distributed with this source code.
11 */
12
13declare(strict_types=1);
14
15namespace League\CommonMark\Extension\Attributes\Node;
16
17use League\CommonMark\Block\Element\AbstractBlock;
18use League\CommonMark\Cursor;
19
20final class Attributes extends AbstractBlock
21{
22    /** @var array<string, mixed> */
23    private $attributes;
24
25    /**
26     * @param array<string, mixed> $attributes
27     */
28    public function __construct(array $attributes)
29    {
30        $this->attributes = $attributes;
31    }
32
33    /**
34     * @return array<string, mixed>
35     */
36    public function getAttributes(): array
37    {
38        return $this->attributes;
39    }
40
41    public function canContain(AbstractBlock $block): bool
42    {
43        return false;
44    }
45
46    public function isCode(): bool
47    {
48        return false;
49    }
50
51    public function matchesNextLine(Cursor $cursor): bool
52    {
53        $this->setLastLineBlank($cursor->isBlank());
54
55        return false;
56    }
57
58    public function shouldLastLineBeBlank(Cursor $cursor, int $currentLineNumber): bool
59    {
60        return false;
61    }
62}
63