There is no parameter named $children.... Did you maybe mean $children?
This check looks for PHPDoc comments describing methods or function parameters that
do not exist on the corresponding method or function. It has, however, found a
similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter $ireland is not defined by
the method finale(...).
It seems like $children of type array<integer,object<Respect\Validation\Result>> is incompatible with the declared type array<integer,object<Respect\Validation\Rule>> of property $children.
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...
60
10
}
61
62
/**
63
* {@inheritdoc}
64
*/
65
8
public function isValid(): bool
66
{
67
8
return $this->isValid;
68
}
69
70
/**
71
* {@inheritdoc}
72
*/
73
8
public function getInput()
74
{
75
8
return $this->input;
76
}
77
78
/**
79
* {@inheritdoc}
80
*/
81
8
public function getRule(): Rule
82
{
83
8
return $this->rule;
84
}
85
86
/**
87
* {@inheritdoc}
88
*/
89
8
public function getChildren(): array
90
{
91
8
return $this->children;
92
}
93
94
/**
95
* {@inheritdoc}
96
*/
97
8
public function getProperties(): array
98
{
99
8
return $this->properties;
100
}
101
102
/**
103
* {@inheritdoc}
104
*/
105
7
public function with($isValid, array $properties = []): Result
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.