From b5f863d3dae886be1c2ba526ebb43aebf3d4b9b9 Mon Sep 17 00:00:00 2001 From: Lars Moelleken Date: Tue, 18 Aug 2020 09:48:21 +0200 Subject: [PATCH] Param: fix phpdoc with reference hint (code style fixes) --- src/DocBlock/Tags/Param.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/DocBlock/Tags/Param.php b/src/DocBlock/Tags/Param.php index 1eb1de0..392b4f9 100644 --- a/src/DocBlock/Tags/Param.php +++ b/src/DocBlock/Tags/Param.php @@ -83,8 +83,7 @@ final class Param extends TagWithType implements Factory\StaticMethod } // if the next item starts with a $ or ...$ or &$ or &...$ it must be the variable name - if ( - isset($parts[0]) + if (isset($parts[0]) && ( strpos($parts[0], '$') === 0 @@ -103,7 +102,7 @@ final class Param extends TagWithType implements Factory\StaticMethod if (strpos($variableName, '$') === 0) { $variableName = substr($variableName, 1); - } elseif(strpos($variableName, '&$') === 0) { + } elseif (strpos($variableName, '&$') === 0) { $isReference = true; $variableName = substr($variableName, 2); } elseif (strpos($variableName, '...$') === 0) {