[Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods

This commit is contained in:
Thomas Calvet 2019-03-06 15:53:23 +01:00
parent c5610fafdb
commit e97ea77af5
2 changed files with 3 additions and 1 deletions

View File

@ -307,7 +307,7 @@ class DebugClassLoader
}
foreach (['final', 'internal'] as $annotation) {
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) {
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
$message = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
self::${$annotation.'Methods'}[$class][$method->name] = [$class, $message];
}

View File

@ -13,6 +13,8 @@ class FinalMethod
/**
* @final
*
* @return int
*/
public function finalMethod2()
{