php-docblock-checker
php-docblock-checker copied to clipboard
?string string|null is not parsed
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
@kaurov Try https://github.com/php-censor/phpdoc-checker.