The type Bitpay\Model\Currency was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. excluded_paths:["lib/*"],
you can move it to the dependency path list as follows:
The expression return new BitPaySDK\Model\Currency($code) returns the type BitPaySDK\Model\Currency which is incompatible with the documented return type Bitpay\Model\Currency.
The call to BitPaySDK\Model\Currency::__construct() has too many arguments starting with $code.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
70
return /** @scrutinizer ignore-call */ new Currency($code);
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.