mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47: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 = '';
|
protected $short_description = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpDocumentor\Reflection\DocBlock\LongDescription The actual description
|
* @var \phpDocumentor\Reflection\DocBlock\LongDescription The actual
|
||||||
* for this docblock.
|
* description for this docblock.
|
||||||
*/
|
*/
|
||||||
protected $long_description = null;
|
protected $long_description = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpDocumentor\Reflection\DocBlock\Tags[] An array containing all
|
* @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();
|
protected $tags = array();
|
||||||
|
|
||||||
@@ -53,15 +53,15 @@ class DocBlock implements \Reflector
|
|||||||
* information.
|
* information.
|
||||||
*
|
*
|
||||||
* @param \Reflector|string $docblock A docblock comment (including
|
* @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
|
* @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
|
* @param string[] $namespace_aliases A list of namespace aliases
|
||||||
* as provided by the `use` keyword; the key of the array is the alias name
|
* as provided by the `use` keyword; the key of the array is the alias
|
||||||
* or last part of the alias array if no alias name is provided.
|
* name or last part of the alias array if no alias name is provided.
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if the given argument does not have the
|
* @throws \InvalidArgumentException if the given argument does not have the
|
||||||
* getDocComment method.
|
* getDocComment method.
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
$docblock,
|
$docblock,
|
||||||
@@ -125,7 +125,7 @@ class DocBlock implements \Reflector
|
|||||||
* @param string $comment Comment to split into the sub-parts.
|
* @param string $comment Comment to split into the sub-parts.
|
||||||
*
|
*
|
||||||
* @author RichardJ Special thanks to RichardJ for the regex responsible
|
* @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
|
* @return string[] containing the short-, long description and an element
|
||||||
* containing the tags.
|
* containing the tags.
|
||||||
@@ -312,9 +312,10 @@ class DocBlock implements \Reflector
|
|||||||
* @param string $type Type to expand into full namespaced
|
* @param string $type Type to expand into full namespaced
|
||||||
* equivalent.
|
* equivalent.
|
||||||
* @param string[] $ignore_keywords Whether to ignore given keywords, when
|
* @param string[] $ignore_keywords Whether to ignore given keywords, when
|
||||||
* null it will use the default keywords: 'string', 'int', 'integer',
|
* null it will use the default keywords:
|
||||||
* 'bool', 'boolean', 'float', 'double', 'object', 'mixed', 'array',
|
* 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
|
||||||
* 'resource', 'void', 'null', 'callback', 'false', 'true'.
|
* 'object', 'mixed', 'array', 'resource', 'void', 'null', 'callback',
|
||||||
|
* 'false', 'true', 'self', '$this', 'callable'.
|
||||||
* Default value for this parameter is null.
|
* Default value for this parameter is null.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
@@ -327,9 +328,9 @@ class DocBlock implements \Reflector
|
|||||||
|
|
||||||
if ($ignore_keywords === null) {
|
if ($ignore_keywords === null) {
|
||||||
$ignore_keywords = array(
|
$ignore_keywords = array(
|
||||||
'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
|
'string', 'int', 'integer', 'bool', 'boolean', 'float',
|
||||||
'object', 'mixed', 'array', 'resource', 'void', 'null',
|
'double', 'object', 'mixed', 'array', 'resource', 'void',
|
||||||
'callback', 'false', 'true', 'self', '$this', 'callable'
|
'null', 'callback', 'false', 'true', 'self', '$this', 'callable'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class LongDescription implements \Reflector
|
|||||||
* Returns the parsed text of this description.
|
* Returns the parsed text of this description.
|
||||||
*
|
*
|
||||||
* @return array An array of strings and tag objects, in the order they
|
* @return array An array of strings and tag objects, in the order they
|
||||||
* occur within the description.
|
* occur within the description.
|
||||||
*/
|
*/
|
||||||
public function getParsedContents()
|
public function getParsedContents()
|
||||||
{
|
{
|
||||||
@@ -109,7 +109,8 @@ class LongDescription implements \Reflector
|
|||||||
/**
|
/**
|
||||||
* Builds a string representation of this object.
|
* 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
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class Tag implements \Reflector
|
|||||||
* Returns the parsed text of this description.
|
* Returns the parsed text of this description.
|
||||||
*
|
*
|
||||||
* @return array An array of strings and tag objects, in the order they
|
* @return array An array of strings and tag objects, in the order they
|
||||||
* occur within the description.
|
* occur within the description.
|
||||||
*/
|
*/
|
||||||
public function getParsedDescription()
|
public function getParsedDescription()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user