We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
26 | 5 | final class Factory |
|
27 | { |
||
28 | 5 | /** |
|
29 | 5 | * @var string[] |
|
30 | */ |
||
31 | 5 | private $namespaces; |
|
32 | |||
33 | /** |
||
34 | 3 | * @var self |
|
35 | */ |
||
36 | 3 | private static $defaultInstance; |
|
37 | 3 | ||
38 | /** |
||
39 | 2 | * Initializes the rule with the defined namespaces. |
|
40 | * |
||
41 | 2 | * If the default namespace is not in the array, it will be add to the end |
|
42 | 2 | * of the array. |
|
43 | * |
||
44 | 6 | * @param array $namespaces |
|
45 | */ |
||
46 | 6 | public function __construct(array $namespaces = []) |
|
54 | |||
55 | /** |
||
56 | 4 | * Returns a list of namespaces. |
|
57 | 4 | * |
|
58 | 1 | * @return array |
|
59 | */ |
||
60 | public function getNamespaces(): array |
||
64 | 2 | ||
65 | /** |
||
66 | * Creates a rule based on its name with the defined arguments. |
||
67 | * |
||
68 | * @param string $ruleName |
||
69 | * @param array $arguments |
||
70 | * |
||
71 | * @throws ComponentException When the rule cannot be created |
||
72 | * |
||
73 | * @return Rule |
||
74 | */ |
||
75 | public function rule(string $ruleName, array $arguments = []): Rule |
||
97 | |||
98 | /** |
||
99 | * Defines the default instance of the factory. |
||
100 | * |
||
101 | * @param Factory $factory |
||
102 | */ |
||
103 | public static function setDefaultInstance(self $factory) |
||
107 | |||
108 | /** |
||
109 | * Returns the default instance of the factory. |
||
110 | * |
||
111 | * @return self |
||
112 | */ |
||
113 | public static function getDefaultInstance(): self |
||
121 | } |
||
122 |
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..