Passed
Pull Request — master (#439)
by Kirill
06:35
created

GuardNamespace::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Domain\Annotation;
13
14
use Attribute;
15
use Doctrine\Common\Annotations\Annotation;
16
use Spiral\Attributes\NamedArgumentConstructor;
17
use Spiral\Attributes\NamedArgumentConstructorAttribute;
18
19
/**
20
 * @Annotation()
21
 * @Annotation\Target({"CLASS"})
22
 * @NamedArgumentConstructor()
23
 */
24
#[Attribute(Attribute::TARGET_CLASS)]
25
#[NamedArgumentConstructor()]
26
final class GuardNamespace implements NamedArgumentConstructorAttribute
27
{
28
    /**
29
     * @Annotation\Attribute(name="namespace", type="string", required=true)
30
     * @type string
31
     */
32
    public $namespace;
33
34
    public function __construct(string $namespace)
35
    {
36
        $this->namespace = $namespace;
37
    }
38
}
39