mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Restored indentation in multi-line tag descriptions, and applied them where they were previously missing.
This commit is contained in:
@@ -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'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user