The call to Benjafield\LaravelPasswo...Password::__construct() has too many arguments starting with $attributes.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
27
return (/** @scrutinizer ignore-call */ new self($attributes))
This check compares calls to functions or methods with their respective definitions.
If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.
It seems like $text can also be of type null; however, parameter $value of Benjafield\LaravelPasswo...MakePassword::setText() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
28
->setText(/** @scrutinizer ignore-type */ $text);
Loading history...
29
}
30
31
/**
32
* Set the plain text version of the password.
33
* Not included when serialized.
34
*
35
* @param string $value
36
* @return $this
37
*/
38
public function setText(string $value): self
39
{
40
$this->text = $value;
41
return $this;
42
}
43
44
/**
45
* Retrieve the plain text version of the password.
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.