Skip to content

Commit

Permalink
detect annotations before blank docblock lines
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Mar 4, 2019
1 parent df1d50d commit dedd526
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Debug/DebugClassLoader.php
Expand Up @@ -233,7 +233,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
// Detect annotations on the class
if (false !== $doc = $refl->getDocComment()) {
foreach (['final', 'deprecated', '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)) {
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
}
}
Expand Down
Expand Up @@ -64,7 +64,6 @@ class FinalClass6
* @author John Doe
*
* @final another
*
* multiline comment...
*
* @return string
Expand Down

0 comments on commit dedd526

Please sign in to comment.