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

GuardNamespace   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
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