Skip to content

Commit

Permalink
Backport 31b50f0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 4, 2021
1 parent e760aee commit 807226e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/Annotation/DocBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ public function requirements(): array
'__FILE' => realpath($this->fileName),
];

// Split docblock into lines and rewind offset to start of docblock
$lines = preg_split('/\r\n|\r|\n/', $this->docComment);
// Trim docblock markers, split it into lines and rewind offset to start of docblock
$lines = preg_replace(['#^/\*{2}#', '#\*/$#'], '', preg_split('/\r\n|\r|\n/', $this->docComment));
$offset -= count($lines);

foreach ($lines as $line) {
Expand Down

0 comments on commit 807226e

Please sign in to comment.