try this code:
/**
* Some description
* @param array $res
* @return string|null
*/
public function sellVoucher(
array $res
): ?string {
if ($res && isset($res['certNumber'])) {
return (string)$res['certNumber'];
}
return null;
}
and get
WARNING @return string|null does not match method signature (Array).
but this annotation is ok and should be accepted