From dedd526b190dc1524296ed0f0c33e023f6fb19fa Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 4 Mar 2019 11:54:25 +0100 Subject: [PATCH] detect annotations before blank docblock lines --- src/Symfony/Component/Debug/DebugClassLoader.php | 2 +- src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 310f7d4e2247c..e6ae0920736d4 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -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]) : ''; } } diff --git a/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php b/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php index 64e12ccf0ef42..4c2b0aaf351f3 100644 --- a/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php +++ b/src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php @@ -64,7 +64,6 @@ class FinalClass6 * @author John Doe * * @final another - * * multiline comment... * * @return string pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy