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

Security::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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