8000 detect annotations before blank docblock lines · symfony/symfony@dedd526 · GitHub
[go: up one dir, main page]

Skip to content

Commit dedd526

Browse files
committed
detect annotations before blank docblock lines
1 parent df1d50d commit dedd526

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Symfony/Component/Debug/DebugClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
233233
// Detect annotations on the class
234234
if (false !== $doc = $refl->getDocComment()) {
235235
foreach (['final', 'deprecated', 'internal'] as $annotation) {
236-
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) {
236+
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
237237
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
238238
}
239239
}

src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class FinalClass6
6464
* @author John Doe
6565
*
6666
* @final another
67-
*
6867
* multiline comment...
6968
*
7069
* @return string

0 commit comments

Comments
 (0)
0