From df67eaf0befacc7e58b3bac0d858022729f26cff Mon Sep 17 00:00:00 2001 From: Vasil Rangelov Date: Mon, 5 Nov 2012 23:14:32 +0200 Subject: [PATCH] Restored indentation in multi-line tag descriptions, and applied them where they were previously missing. --- src/phpDocumentor/Reflection/DocBlock.php | 31 ++++++++++--------- .../Reflection/DocBlock/LongDescription.php | 5 +-- src/phpDocumentor/Reflection/DocBlock/Tag.php | 2 +- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/phpDocumentor/Reflection/DocBlock.php b/src/phpDocumentor/Reflection/DocBlock.php index 383eaca..e82ceba 100644 --- a/src/phpDocumentor/Reflection/DocBlock.php +++ b/src/phpDocumentor/Reflection/DocBlock.php @@ -25,14 +25,14 @@ class DocBlock implements \Reflector protected $short_description = ''; /** - * @var \phpDocumentor\Reflection\DocBlock\LongDescription The actual description - * for this docblock. + * @var \phpDocumentor\Reflection\DocBlock\LongDescription The actual + * description for this docblock. */ protected $long_description = null; /** * @var \phpDocumentor\Reflection\DocBlock\Tags[] An array containing all - * the tags in this docblock; except inline. + * the tags in this docblock; except inline. */ protected $tags = array(); @@ -53,15 +53,15 @@ class DocBlock implements \Reflector * information. * * @param \Reflector|string $docblock A docblock comment (including - * asterisks) or reflector supporting the getDocComment method. + * asterisks) or reflector supporting the getDocComment method. * @param string $namespace The namespace where this - * DocBlock resides in; defaults to `\`. + * DocBlock resides in; defaults to `\`. * @param string[] $namespace_aliases A list of namespace aliases - * as provided by the `use` keyword; the key of the array is the alias name - * or last part of the alias array if no alias name is provided. + * as provided by the `use` keyword; the key of the array is the alias + * name or last part of the alias array if no alias name is provided. * * @throws \InvalidArgumentException if the given argument does not have the - * getDocComment method. + * getDocComment method. */ public function __construct( $docblock, @@ -125,7 +125,7 @@ class DocBlock implements \Reflector * @param string $comment Comment to split into the sub-parts. * * @author RichardJ Special thanks to RichardJ for the regex responsible - * for the split/ + * for the split. * * @return string[] containing the short-, long description and an element * containing the tags. @@ -312,9 +312,10 @@ class DocBlock implements \Reflector * @param string $type Type to expand into full namespaced * equivalent. * @param string[] $ignore_keywords Whether to ignore given keywords, when - * null it will use the default keywords: 'string', 'int', 'integer', - * 'bool', 'boolean', 'float', 'double', 'object', 'mixed', 'array', - * 'resource', 'void', 'null', 'callback', 'false', 'true'. + * null it will use the default keywords: + * 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', + * 'object', 'mixed', 'array', 'resource', 'void', 'null', 'callback', + * 'false', 'true', 'self', '$this', 'callable'. * Default value for this parameter is null. * * @return string @@ -327,9 +328,9 @@ class DocBlock implements \Reflector if ($ignore_keywords === null) { $ignore_keywords = array( - 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', - 'object', 'mixed', 'array', 'resource', 'void', 'null', - 'callback', 'false', 'true', 'self', '$this', 'callable' + 'string', 'int', 'integer', 'bool', 'boolean', 'float', + 'double', 'object', 'mixed', 'array', 'resource', 'void', + 'null', 'callback', 'false', 'true', 'self', '$this', 'callable' ); } diff --git a/src/phpDocumentor/Reflection/DocBlock/LongDescription.php b/src/phpDocumentor/Reflection/DocBlock/LongDescription.php index 76d5f9f..857ac66 100644 --- a/src/phpDocumentor/Reflection/DocBlock/LongDescription.php +++ b/src/phpDocumentor/Reflection/DocBlock/LongDescription.php @@ -55,7 +55,7 @@ class LongDescription implements \Reflector * Returns the parsed text of this description. * * @return array An array of strings and tag objects, in the order they - * occur within the description. + * occur within the description. */ public function getParsedContents() { @@ -109,7 +109,8 @@ class LongDescription implements \Reflector /** * Builds a string representation of this object. * - * @todo determine the exact format as used by PHP Reflection and implement it. + * @todo determine the exact format as used by PHP Reflection + * and implement it. * * @return void */ diff --git a/src/phpDocumentor/Reflection/DocBlock/Tag.php b/src/phpDocumentor/Reflection/DocBlock/Tag.php index ba02db3..ffd3027 100644 --- a/src/phpDocumentor/Reflection/DocBlock/Tag.php +++ b/src/phpDocumentor/Reflection/DocBlock/Tag.php @@ -120,7 +120,7 @@ class Tag implements \Reflector * Returns the parsed text of this description. * * @return array An array of strings and tag objects, in the order they - * occur within the description. + * occur within the description. */ public function getParsedDescription() {