Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class Config |
||
16 | { |
||
17 | /** |
||
18 | * @var array|null |
||
19 | */ |
||
20 | protected $defaultScopes = []; |
||
21 | |||
22 | /** |
||
23 | * @var ScopePolicyInterface |
||
24 | */ |
||
25 | protected $scopePolicy; |
||
26 | |||
27 | public function __construct() |
||
28 | { |
||
29 | $this->scopePolicy = new DefaultScopePolicy([$this->defaultScopes]); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | public function getDefaultScopes(): ?array |
||
36 | { |
||
37 | return $this->defaultScopes; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param array $defaultScopes |
||
42 | */ |
||
43 | public function setDefaultScopes(?array $defaultScopes): void |
||
44 | { |
||
45 | $this->defaultScopes = $defaultScopes; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return ScopePolicyInterface |
||
50 | */ |
||
51 | public function getScopePolicy(): ScopePolicyInterface |
||
52 | { |
||
53 | return $this->scopePolicy; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @param string $scopePolicy |
||
58 | */ |
||
59 | public function setScopePolicy(string $scopePolicy): void |
||
62 | } |
||
63 | } |
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..