The method getI18n() does not exist on Throwable. It seems like you code against a sub-type of Throwable such as W2w\Lib\ApieObjectAccess...ns\ObjectWriteException or W2w\Lib\ApieObjectAccess...s\NameNotFoundException or W2w\Lib\ApieObjectAccess...s\ObjectAccessException or W2w\Lib\ApieObjectAccess...ons\ValidationException or W2w\Lib\ApieObjectAccess...ouldNotConvertException or W2w\Lib\Apie\Exceptions\...ForValueObjectException or W2w\Lib\Apie\Exceptions\...dNotBeNegativeException or W2w\Lib\Apie\Exceptions\InvalidPageLimitException or W2w\Lib\Apie\Exceptions\InvalidIdException or W2w\Lib\Apie\Exceptions\MethodNotAllowedException or W2w\Lib\ApieObjectAccess...ns\ObjectWriteException or W2w\Lib\ApieObjectAccess...s\NameNotFoundException or W2w\Lib\ApieObjectAccess...s\ObjectAccessException or W2w\Lib\ApieObjectAccess...ons\ValidationException or W2w\Lib\ApieObjectAccess...ouldNotConvertException or W2w\Lib\Apie\Exceptions\...ForValueObjectException or W2w\Lib\Apie\Exceptions\...dNotBeNegativeException or W2w\Lib\Apie\Exceptions\InvalidPageLimitException or W2w\Lib\Apie\Exceptions\InvalidIdException or W2w\Lib\Apie\Exceptions\MethodNotAllowedException.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
37
/** @scrutinizer ignore-call */
38
$i18n = $object->getI18n();
Loading history...
38
$replacements = [];
39
foreach ($i18n->getReplacements() as $key => $value) {
40
if (is_array($value)) {
41
$replacements[$key] = json_encode($value);
42
} else {
43
$replacements[$key] = $value;
44
}
45
}
46
$data['message'] = $this->translator->choice(
47
'apie::' . $i18n->getMessageString(),
48
$i18n->getAmount(),
49
$replacements
50
);
51
return $data;
52
}
53
54
/**
55
* {@inheritDoc}
56
*/
57
public function supportsNormalization($data, string $format = null)