The call to Mostafaznv\Larupload\Con...allables::__construct() has too many arguments starting with $name.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
21
$self = /** @scrutinizer ignore-call */ new self($name, $mode);
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.
In this branch, the function will implicitly return null which is incompatible with the type-hinted return Mostafaznv\Larupload\UploadEntities. Consider adding a return statement or allowing null as return value.
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type.
Let?s take a look at an example:
interfaceReturnsInt{publicfunctionreturnsIntHinted():int;}classMyClassimplementsReturnsInt{publicfunctionreturnsIntHinted():int{if(foo()){return123;}// here: null is implicitly returned}}
In this branch, the function will implicitly return null which is incompatible with the type-hinted return Illuminate\Database\Eloquent\Model. Consider adding a return statement or allowing null as return value.
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type.
Let?s take a look at an example:
interfaceReturnsInt{publicfunctionreturnsIntHinted():int;}classMyClassimplementsReturnsInt{publicfunctionreturnsIntHinted():int{if(foo()){return123;}// here: null is implicitly returned}}
Loading history...
31
}
32
33
/**
34
* @internal
35
*/
36
public function deleted(): void
37
{
38
$this->internalException();
39
}
40
41
/**
42
* @internal
43
*/
44
public function download(string $style = 'original'): StreamedResponse|RedirectResponse|null
In this branch, the function will implicitly return null which is incompatible with the type-hinted return Mostafaznv\Larupload\Con...neLaruploadNotCallables. Consider adding a return statement or allowing null as return value.
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type.
Let?s take a look at an example:
interfaceReturnsInt{publicfunctionreturnsIntHinted():int;}classMyClassimplementsReturnsInt{publicfunctionreturnsIntHinted():int{if(foo()){return123;}// here: null is implicitly returned}}
Loading history...
60
}
61
62
private function internalException()
63
{
64
throw new Exception(
65
'This function is flagged as @internal and is not available on the standalone uploader.'
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.