Commit Graph
164 Commits
Author SHA1 Message Date
Mike van Riel 70eadb02df Add tests for covers tag 2015-06-14 08:50:52 +02:00
Mike van Riel 260a74a77b Expand tests of Author tag with BaseTag covered functionality 2015-06-14 08:18:12 +02:00
Mike van Riel 0d29e96332 Add test for Author Tag 2015-06-14 00:33:59 +02:00
Mike van Riel 8798633221 Add test for passthroughformatter 2015-06-14 00:10:36 +02:00
Mike van Riel 73185b45fd Moved formatters from Description to tags namespace because they only format a Tag now 2015-06-14 00:02:36 +02:00
Mike van Riel 66c45cf480 Update Serializer to match new architecture and add test for it 2015-06-13 23:41:44 +02:00
Mike van Riel e1e2b5cd98 Tweak phpunit configuration and fix mocking errors 2015-06-13 21:46:07 +02:00
Mike van Riel 056607296e Update travis and scrutinizer config 2015-06-13 21:29:32 +02:00
Mike van Riel c24f8ead92 Write test for the Description object and stabilize the API 2015-06-13 21:25:21 +02:00
Mike van Riel ab3ebf467c Add assertions to DocBlock 2015-06-13 18:41:45 +02:00
Mike van Riel 5749b814fb Add test for DocBlock class 2015-06-13 18:01:00 +02:00
Mike van Riel b87a111eb2 Remove tests that fail and should be re-made 2015-06-13 18:00:29 +02:00
Mike van Riel 2054338d51 Remove old tag tests because they need to be rewritten from scratch 2015-06-13 14:28:28 +02:00
Mike van Riel 18ef0a8055 Refactored 90% of the library 2015-06-12 20:58:56 +02:00
Mike van Riel b54671f51f Introduce Types
phpDocumentor is capable of representing a whole series of types, more
than PHP supports in fact, and this commit represents those types and a
Resolver that is capable of taking a type Expression and resolving that
to a series of Value Objects representing those types.
2015-06-08 07:05:32 +02:00
Mike van Riel fab7169255 Add support for types and improve resolution
As part of the re-architecting of phpDocumentor and its Reflection component
we needed to move the type classes from the \phpDocumentor\Descriptor
namespace to \phpDocumentor\Reflection\Types.

In addition to this I have removed the resolution / type creation from the
Collection class into a new Resolver class that is capable of resolving any
type into a Type or Fqsen object.

This is the first commit with the base classes and a test for the Resolver
functionality in subsequent commits we need to add tests for the other
classes and to refactor the collection object.
2015-06-07 11:03:28 +02:00
Mike van Riel f3f4d07808 Make Context leaner and enable third parties to create them
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).
2015-06-06 20:03:59 +02:00
Mike van Riel 9f929a987a Disable failing test before tagging 2015-02-03 13:10:50 +01:00
Mike van Riel 6142bbbbbf Add missing DocBlock (info). 2014-08-30 11:16:26 +02:00
Mike van Riel fe8652b292 Add support for DocBlock template markers
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.
2014-08-30 11:08:15 +02:00
Carsten Brandt 4922a4a286 Preserve newlines in docblock tags
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.
2014-02-28 17:17:48 +01:00
Vasil Rangelov d99732612a Added support for static method declarations at MethodTag and according unit tests.
Fixed MethodTag::getContent() to actually return the content as opposed to $this;
2013-05-16 22:17:15 +03:00
Vasil Rangelov 7f55602948 Adjusted Unit tests and docs to match the latest dot separation. 2013-04-16 19:25:40 +03:00
Vasil Rangelov 8223e475fa Refactored all tags to have setters for all of their components;
Removed the special handling for VarTag (it's now equivalent to ParamTag);
Minor doc, CS and coverage fixes.
2012-11-30 19:26:19 +02:00
Vasil Rangelov 23dedb3e10 CS fixes. 2012-11-27 19:52:28 +02:00
Vasil Rangelov 5712aa6efd Added @boenrobot to Travis' email notifications;
Some CS fixes at TagTest.php.
2012-11-22 13:22:00 +02:00
Vasil Rangelov bf3e86788d Added tests related to the namespaced tag support;
Restored ReturnTag::getTypesCollection() to "protected", to avoid potential BC breaks later.
2012-11-22 01:23:31 +02:00
Vasil Rangelov 2dbc608a51 Added support for namespaced tags;
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.
2012-11-22 00:37:22 +02:00
Vasil Rangelov 8bb304309c Introduced Context and Location, and adapted Collection and ReturnTag accordingly. 2012-11-21 15:55:10 +02:00
Vasil Rangelov a4b899e96c Reverted the move of explode() into Return, and moved the implode() into Collection's new __toString() method instead;
Also had to made type resolution lazy, as a pleasant side effect.

This reverts commit db20ae39fb.
2012-11-18 18:50:45 +02:00
Vasil Rangelov cee63f991d Revert "Merge pull request #10 from boenrobot/author"
This reverts commit 21c36677ab, reversing
changes made to ffcaa03337.
2012-11-18 17:15:48 +02:00
Vasil Rangelov c33dc9e7d7 Merge pull request #10 from boenrobot/author
Introduced role, description and space separated URIs to the author tag.
2012-11-17 06:33:38 -08:00
Vasil Rangelov 86c72b291a Added @example tag handler, and registered it and @source at Tag. 2012-11-17 15:23:16 +02:00
Vasil Rangelov c70be2a745 Added reflection for @source tag. 2012-11-17 15:16:56 +02:00
Vasil Rangelov 29dcb18b95 Merge pull request #11 from boenrobot/version-and-derivatives
Reflections for @version, @since and @deprecated
2012-11-17 05:13:04 -08:00
Vasil Rangelov a4855850d3 Moved the type separation into ReturnTag, for consistency with the type merging that is currently there. 2012-11-16 21:43:25 +02:00
Vasil Rangelov 3bfb48da76 Doc updates and fixes. 2012-11-13 21:50:56 +02:00
Vasil Rangelov 532fb040ab Merge branch 'master' of github.com:boenrobot/ReflectionDocBlock into author
Conflicts:
	src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
2012-11-13 19:13:34 +02:00
Vasil Rangelov 3d8bcdbe5b Merge branch 'master' of github.com:boenrobot/ReflectionDocBlock into version-and-derivatives 2012-11-13 19:05:14 +02:00
Vasil Rangelov 903722e389 Renamed LongDescription to Description, to better serve its new dual role as "holder for a place where inline tags can occur";
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.
2012-11-13 17:16:30 +02:00
Vasil Rangelov ea62320415 Tweaked the "testInvalidTagBlock" test to appease PHPCS (though strictly speaking, this is a bug with PHPCS "NEWDOC" handling). 2012-11-13 16:43:36 +02:00
Vasil Rangelov 8107678560 Added reflections for @version, @since and @deprecated, which separate the version vector (if one is provided) from the description. 2012-11-13 15:28:17 +02:00
Vasil Rangelov 6602ce0375 @return now trims the content before splitting it;
Removed ThrowTag.php (unnecessary, given the map, which aliases "throw" to ThrowsTag.php);
Added tests for ThrowsTag, along with a few other minor test additions and fixes;
2012-11-11 19:51:04 +02:00
Vasil Rangelov 2348c16485 Applied multi line fixes to @param, analogous to those in @return. 2012-11-11 17:45:16 +02:00
Vasil Rangelov b802727676 Minor syntax and doc fixes at Tag::registerTagHandler();
Split the "testTagHandlerRegistration" test into several new ones, with appropriate @covers annotations added;
Although not required for single liners, class names at the built in tag handlers map are indented on a separate line for readability.
2012-11-11 15:20:59 +02:00
Vasil Rangelov 08dc71ba37 Refactored Tag::createInstance() to use a simple tag-to-class map, that has the default tag handlers pre-registered. 2012-11-11 00:54:51 +02:00
Vasil Rangelov d73444f859 Minor doc fixes. 2012-11-10 23:45:28 +02:00
Vasil Rangelov f11936eaae Removed DocBlock::expandType() and associated tests, as previously advised by @mvriel;
Added tests for generic Tag objects, and a few others;
Increased total coverage by more appropriate use of @covers annotations.
2012-11-10 23:19:36 +02:00
Vasil Rangelov 6e1bb192b3 Inverted @param and @return hierarchy;
More fixes to tests and code coverage increase.
2012-11-10 20:27:57 +02:00
Vasil Rangelov 038a5f3150 Introduced role, description and space separated URIs to the author tag. 2012-11-10 16:50:39 +02:00