Completed
Push — master ( 235985...1f7999 )
by Colin
01:38 queued 10s
created

AttributesInline::setAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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\Node\Inline\AbstractInline;
18
19
final class AttributesInline extends AbstractInline
20
{
21
    /** @var array<string, mixed> */
22
    public $attributes;
23
24
    /** @var bool */
25
    public $block;
26
27
    /**
28
     * @param array<string, mixed> $attributes
29
     */
30 15
    public function __construct(array $attributes, bool $block)
31
    {
32 15
        $this->attributes = $attributes;
33 15
        $this->block      = $block;
34 15
    }
35
36
    /**
37
     * @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...
38
     */
39 15
    public function getAttributes(): array
40
    {
41 15
        return $this->attributes;
42
    }
43
44
    /**
45
     * @param array<string, mixed> $attributes
46
     */
47
    public function setAttributes(array $attributes): void
48
    {
49
        $this->attributes = $attributes;
50
    }
51
52 12
    public function isBlock(): bool
53
    {
54 12
        return $this->block;
55
    }
56
}
57