Contexts are necessary for factories to resolve QSEN into FQSENs based
on partial namespaces and namespace aliases. These provide DocBlocks
with the namespace name and namespace aliases.
The new ContextFactory will enable third parties who don't use
phpDocumentor's Reflection component to construct a Context based on
a class reflector or namespace name (and file contents).
DocBlocks may start with #@+ and #@- to indicate that they are (the start) of a DocBlock
template or the end of a template.
In this commit I have changed the way a DocBlock is parsed to interpret this information
and added tests to show for it. In addition I have added more comments to the Regular
Expression responsible for splitting a DocBlock to show the business rules more clearly.
This is the first step in implementing https://github.com/phpDocumentor/phpDocumentor2/issues/42.
This is especially important when using markdown.
Adding a blank line between text introduces a new paragraph.
Current implementation will result in all text staying in one paragraph
and also other elements like lists and code do not get recognized in
most cases.
Performance improvement in Serializer - wrap length is calculated once during the text portion only. Tags reuse the result. Also no "prefix" adding in tags - the name is simply added before wrapping.
Swapped the indent and indent string options at Serializer's constructor;
Renamed Serializer::setIndentFirstLine() to setIsFirstLineIndented() in accordance with the getter (PHPMD fix);
Line length is now ACTUALLY line length, i.e. it takes the indentation into account, and is applied to tags as well;
Fixed ReturnTag::setContent() to set "types" to NULL;
A lot of doc and CS fixes at Serializer.php.
Changed the list of keywords to be static (for the purpose of reducing memory consumption);
Updated composer.lock with the latest dependencies (PHPUnit in particular).
Simplified @see and @link parsing;
Added comments to the regexes of @method, @example and @source;
Added a test case for what 2812eac046 intended to fix.
Tag::__construct() trims the description (as is common for most tag handlers), while the original contents is still in the $content property;
Added the DocBlock argument to all tag handlers.
Removed Tag::setDocblock() in favor of an additional constructor argument that defaults to NULL;
Tag::createInstance() and Description's constructor now have a second argument, allowing the specification of an owning DocBlock;
Description::getParsedContents() assigns the Description's owning DocBlock object when creating tags.