62 Commits
Author SHA1 Message Date
Nereo Berardozzi b6ff9f9360 Fixed parsing of string literals and array shapes (#27) 2025-01-18 20:26:32 +01:00
Nereo Berardozzi ffb733ef78 Fixed callable types parsing (#26) 2024-12-30 19:14:26 +01:00
Barry vd. Heuvel 6b3854ad25 Add ContextFactory (#25) 2024-12-30 11:31:22 +01:00
Nereo Berardozzi 476f62b577 Added generics to Context (#22) 2024-12-24 19:06:41 +01:00
Nereo Berardozzi e5c8b970d6 Handle more PHPDoc type keyworks (#23)
* Added advanced PHPDoc type keyworks

* Fixed typed keywords
2024-12-24 19:06:02 +01:00
Nereo Berardozzi d5d2d76892 Parse template tag for generics (#21)
* Parse template tag for generics

* Fixed templatetag docblock

* Fixed PHP 7 issue

* Fixed PHP 7.2 issue

* Fixed another 7.2 issue
2024-12-24 12:30:50 +01:00
武田 憲太郎 836d531676 Fixed incorrect parsing of return types for generics and closures 2024-10-20 09:02:42 +09:00
武田 憲太郎 23fa082874 Support nested generics and closures type hint 2024-10-16 18:33:31 +09:00
Andrew Smith 9a2f0eb8ba Support parsing SuppressWarnings tags in doc block
Signed-off-by: Andrew Smith <[email protected]>
2022-11-03 21:08:57 +10:00
Barry vd. Heuvel ad1e63e15c Fix tests 2022-10-31 16:20:50 +01:00
Barry vd. Heuvel fe49c3d9ee Update tests 2022-10-31 16:13:07 +01:00
M@ster 295d2fba38 Generic types bug fix 2022-10-19 23:16:04 +02:00
Barry vd. Heuvel 3dcbd98b5d Update namespace 2016-06-13 21:28:20 +02:00
Barry vd. Heuvel d411a2bc7e Merge branch 'release/2.x' of https://github.com/phpDocumentor/ReflectionDocBlock 2016-06-13 21:28:05 +02:00
Marieke Bednarczyk 708c2c9253 fix for bug #1672 in phpDocumentor2
When dealing with inline @see or @link tags and having a relative method or property type
like LinkDescriptor::setLink() and a namespace alias like phpDocumentor\Descriptor\Tag\LinkDescriptor
Collection::expand() was checking if LinkDescriptor::setLink() could be found in the namespace aliases.
This would never be true.
In this fix, the method or type (for instance ::setLink()) part is removed for comparison
and later re-added when generating the full name
2015-12-13 15:52:57 +01:00
Mike van Riel d68dbdc53d Disable failing test before tagging 2015-02-03 13:10:50 +01:00
Mike van Riel 21feb61eb5 Add missing DocBlock (info). 2014-08-30 11:16:26 +02:00
Mike van Riel 280a3ce56d 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 53ba484043 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 63c9de4e8b 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 76619d4a16 Adjusted Unit tests and docs to match the latest dot separation. 2013-04-16 19:25:40 +03:00
Vasil Rangelov b09525332f 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 8418970624 CS fixes. 2012-11-27 19:52:28 +02:00
Vasil Rangelov 0d38c84407 Added @boenrobot to Travis' email notifications;
Some CS fixes at TagTest.php.
2012-11-22 13:22:00 +02:00
Vasil Rangelov beb96a487b 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 7a03741e0b 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 99054d341f Introduced Context and Location, and adapted Collection and ReturnTag accordingly. 2012-11-21 15:55:10 +02:00
Vasil Rangelov 9da4a65065 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 39faeec91d 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 21c36677ab 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 37810ef836 Added @example tag handler, and registered it and @source at Tag. 2012-11-17 15:23:16 +02:00
Vasil Rangelov 587406073d Added reflection for @source tag. 2012-11-17 15:16:56 +02:00
Vasil Rangelov aed654aa85 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 db20ae39fb 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 a18985a888 Doc updates and fixes. 2012-11-13 21:50:56 +02:00
Vasil Rangelov c2f692140f 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 26e2eade91 Merge branch 'master' of github.com:boenrobot/ReflectionDocBlock into version-and-derivatives 2012-11-13 19:05:14 +02:00
Vasil Rangelov 1352ef56a6 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 6df31db139 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 829a92e5aa 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 04936a7b39 @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 ae82b8488f Applied multi line fixes to @param, analogous to those in @return. 2012-11-11 17:45:16 +02:00
Vasil Rangelov bae65d2afe 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 28df2a4cd6 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 fedcd8cf49 Minor doc fixes. 2012-11-10 23:45:28 +02:00
Vasil Rangelov a868c60f8e 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 e6d2ec7c54 Inverted @param and @return hierarchy;
More fixes to tests and code coverage increase.
2012-11-10 20:27:57 +02:00
Vasil Rangelov f19dac185a Introduced role, description and space separated URIs to the author tag. 2012-11-10 16:50:39 +02:00
Vasil Rangelov 8b9591a7c5 Made the Tag::createInstance() create generic tag objects when there are uppercase letters in the tag name
(this fixes phpDocumentor/phpDocumentor2#672).
2012-11-10 14:00:01 +02:00
Vasil Rangelov 082c9354d0 Increased unit test coverage of DocBlock;
Moved the tag block checks outside (and prior to) the tag line loop;
Doc and CS fixes.
2012-11-10 13:24:46 +02:00