The method getNumberofChildren() does not exist on FG\ASN1\ASNObject. It seems like you code against a sub-type of FG\ASN1\ASNObject such as FG\ASN1\Construct.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
34
if ($asnObject->/** @scrutinizer ignore-call */ getNumberofChildren() !== 2) {
Loading history...
35
throw new SignatureDecodeException('Invalid data.');
36
}
37
38
if (!($asnObject[0] instanceof Integer && $asnObject[1] instanceof Integer)) {
39
throw new SignatureDecodeException('Invalid data.');
It seems like gmp_init($asnObject[0]->getContent(), 10) can also be of type resource; however, parameter $r of Mdanter\Ecc\Crypto\Signa...ignature::__construct() does only seem to accept GMP, 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
It seems like gmp_init($asnObject[1]->getContent(), 10) can also be of type resource; however, parameter $s of Mdanter\Ecc\Crypto\Signa...ignature::__construct() does only seem to accept GMP, 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