mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f5ba70c30 | ||
|
|
700b4e071f | ||
|
|
d103774cbe | ||
|
|
5a3e22c213 |
@@ -7,8 +7,6 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
php-tests:
|
||||
|
||||
@@ -206,8 +206,9 @@ class Serializer
|
||||
$text = wordwrap($text, $wrapLength);
|
||||
}
|
||||
$text = str_replace("\n", "\n{$indent} * ", $text);
|
||||
$text = preg_replace('/^(\s*\*)[ \t]+$/m', '$1', $text);
|
||||
|
||||
$comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n";
|
||||
$comment = !empty($text)? "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n" : "{$firstIndent}/**\n";
|
||||
|
||||
$tags = array_values($docblock->getTags());
|
||||
|
||||
@@ -220,6 +221,7 @@ class Serializer
|
||||
$tagText = wordwrap($tagText, $wrapLength);
|
||||
}
|
||||
$tagText = str_replace("\n", "\n{$indent} * ", $tagText);
|
||||
$tagText = preg_replace('/^(\s*\*)[ \t]+$/m', '$1', $tagText);
|
||||
|
||||
$comment .= "{$indent} * {$tagText}\n";
|
||||
|
||||
|
||||
@@ -409,6 +409,6 @@ class Tag implements \Reflector
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return "@{$this->getName()} {$this->getContent()}";
|
||||
return trim("@{$this->getName()} {$this->getContent()}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user