Embed::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource\Annotation;
6
7
use Attribute;
8
9
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
10
final class Embed
11
{
12
    /**
13
     * Relation
14
     *
15
     * @var string
16
     */
17
    public $rel;
18
19
    /**
20
     * Embed resource uri
21
     *
22
     * @var string
23
     */
24
    public $src;
25
26
    /** @param array{rel?: string, src?: string} $values */
27
    public function __construct(array $values = [], string $rel = '', string $src = '')
28
    {
29
        $this->rel = $values['rel'] ?? $rel;
30
        $this->src = $values['src'] ?? $src;
31
    }
32
}
33