Passed
Push — master ( 928313...9b22c0 )
by Damien
04:01
created

Security   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace DH\Auditor\Provider\Doctrine\Auditing\Annotation;
4
5
use Attribute;
6
use Doctrine\Common\Annotations\Annotation;
7
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
8
use Doctrine\Common\Annotations\Annotation\Required;
9
10
/**
11
 * @Annotation
12
 * @NamedArgumentConstructor()
13
 * @Target("CLASS")
14
 * @Attributes({
15
 *     @Attribute("view", required=true, type="array<string>"),
16
 * })
17
 */
18
#[Attribute(Attribute::TARGET_CLASS)]
19
final class Security
20
{
21
    public const VIEW_SCOPE = 'view';
22
23
    /**
24
     * @var string
25
     * @Required
26
     */
27
    public $view;
28
29
    public function __construct(array $view)
30
    {
31
        $this->view = $view;
0 ignored issues
show
Documentation Bug introduced by
It seems like $view of type array is incompatible with the declared type string of property $view.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
32
    }
33
}
34