Commit Graph
268 Commits
Author SHA1 Message Date
Jaapio cf16f630f2 Fix code style 2020-01-16 09:49:07 +01:00
Jaapio ce65c06bb6 Fix serialization issue of InvalidTag 2020-01-16 09:38:58 +01:00
Jaapio bb629f6469 Improvements to code 2020-01-12 13:19:45 +01:00
Jaapio bdecc2d3bf Fix issue when processing invalid tags
When invalid tags are processed a null was returned causing all kind
of issues in the normal behavior of this libary. As a solution a generic tag
could be created. But that would just drop the error information in.
Therefore a new tag was introduced, `invalidTag` the tag is just like the
generic tag but does contain the error triggered during the creation of the
tag. Which might help applications like phpdocumentor to display validation issues.
2020-01-03 13:33:06 +01:00
Mike van Riel c5a39003d5 Fixes #181: Example did not implement interface 2019-12-27 21:42:04 +01:00
Mike van Riel b668892da4 Fix tests and linting errors after merging in release 4.x 2019-12-27 21:38:28 +01:00
Mike van Riel 1a5d9a2dbc Add braces support to Property, Property-Read, Property-Write and Var 2019-12-27 21:07:05 +01:00
Mike van Riel bb19583948 Support braces in types for @param 2019-12-27 21:02:14 +01:00
Mike van Riel 506fd89d43 Move type extraction to base class and re-use in Throws 2019-12-27 20:59:58 +01:00
Mike van Riel 19dd184a2b Support braces in types for @return
In this change, I have introduced a miniature automaton-light to parse
the type from the @return body. This will prevent issues with people
using generics and other unsupported forms of types.

This change does _not_ allow for the use of Generics or similar; the
TypeResolver will still fail to resolve this type. This will remove a
breaking issue in consuming applications where a runtime exception used
to be thrown.

Please note that this change is only for @return; other tags still need
to be done. This will resolve issue #186
2019-12-27 20:18:32 +01:00
Corey Taylor 97b796040a Fixed @method annotations with an empty argument list and description 2019-12-19 08:41:51 -06:00
Jaapio c14c01875a Make static anlisys pass 2019-12-10 23:46:06 +01:00
Jaapio 50ec1362de Psalm fixes 2019-09-26 21:09:37 +02:00
Jaapio 19a1f3a91f Phpstan to max level 2019-09-20 16:52:17 +02:00
Jaapio aee984014b Apply new code style 2019-09-20 10:54:12 +02:00
Mike van Riel 8fcadfe5f8 No longer bubble tag exceptions to the top
When a tag has an invalid component to it it would cause a whole file to fail
to parse. Instead we should consider invalid tags a nuisance but not worth
breaking the whole parsing over.

In this change I have added a try..catch that will prevent invalid tags from
breaking the whole parsing process.
2019-06-15 22:45:01 +02:00
Michael Knappe 095cf6d37a fixed generic tag to parse description with 0 as expected 2019-04-30 13:21:57 +02:00
Chuck Burgess a29cd5c528 initialize line count to an int; 2018-06-20 09:34:23 -05:00
Chuck Burgess cc0998e471 add self return type; 2018-01-31 08:58:25 -06:00
Chuck Burgess ff287a453f remove unused imports; 2018-01-31 08:58:03 -06:00
Chuck Burgess 5ea3cbf8cf add missing typehints and return types; 2018-01-31 08:57:30 -06:00
Chuck Burgess fb948e8a52 regex fix for ellipsis in summary text; 2018-01-07 08:51:10 -06:00
TomasVotruba 1c8f795c0e apply coding standard to code 2018-01-02 13:40:57 +01:00
Gabriel Caruso a1e6160b99 Welcome 2018 🎉 2018-01-02 04:52:36 -02:00
Tomáš Votruba bab88701ea Add PHPStan and bump to max level (#139)
* composer: put require- together

* add phpstan

* add phpstan to travis

* phpstan fixes

* phpstan fixes

* phpstan fixes

* drop null defaults since every property is null by default

* DescriptionFactory: fix parse nullable type

* travis: add phpstan max

* travis: fix phpstan config
2017-12-02 19:12:29 +01:00
TomasVotruba c19b4d170c [cs] remove value-less docblocks 2017-11-30 10:27:01 +01:00
TomasVotruba c664d2866d fix cs 2017-11-30 10:27:01 +01:00
TomasVotruba f8d4fda4f3 fix cs 2017-11-30 10:27:01 +01:00
TomasVotruba 51122cfa1d improve comment 2017-11-30 10:27:01 +01:00
TomasVotruba 082c811880 remove unused docblocks 2017-11-30 10:27:01 +01:00
TomasVotruba 4a9675841b add PHP 7.1 typehints 2017-11-30 10:27:01 +01:00
TomasVotruba 0bac84ee68 remove unused docblocks 2017-11-30 10:27:01 +01:00
TomasVotruba 154c85b680 remove unused namespaces 2017-11-30 10:27:01 +01:00
TomasVotruba b2e816c8ad fix tests 2017-11-30 10:27:01 +01:00
TomasVotruba 5e1bad3628 drop asserts where not needed 2017-11-30 10:27:01 +01:00
TomasVotruba 193731a153 remove tests and validation that are now covered by typehints 2017-11-30 10:27:01 +01:00
TomasVotruba d874c4d14a add strict_types and typehints 2017-11-30 10:27:01 +01:00
TomasVotruba 94fd000123 fix cs 2017-11-30 08:14:17 +01:00
TomasVotruba 763f26e8db fix extra space after tag removal 2017-11-30 08:14:17 +01:00
Tomáš Votruba 66465776cf Example: add missing typehtins
This package actually fails on checking itself here
2017-11-27 18:38:31 +01:00
TomasVotruba 5ff9ca38c5 [cs] finalize, spaces, concat and strict comparison 2017-11-12 21:23:54 +01:00
TomasVotruba a872e515bb [cs] add and apply psr2 2017-11-12 21:23:54 +01:00
TomasVotruba 771a21db91 [cs] use short arrays, order imports 2017-11-12 21:23:54 +01:00
TomasVotruba c9c580e482 DocBlock: move public method up 2017-11-10 23:53:51 +01:00
Tomáš Votruba c62f4592a0 DocBlock: add removeTag() method 2017-11-10 23:53:51 +01:00
Jaapio c5545d1519 Adds sort to order expected keys
Without this sort the order of argument name and type matter. But
we accually don't care about the order. Only name and type are allowed
but the order doesn't matter.
2017-09-11 19:56:35 +02:00
Bozhidar Hristov b2f473ed77 Update Description.php
Getter for `tags`.
2017-09-11 19:53:47 +02:00
Jaapio 2d3d238c43 Adds name to example tag 2017-08-30 20:51:59 +02:00
Jaapio 1d3a5e8585 Fixes namespace error in ExampleFinder 2017-08-30 20:51:28 +02:00
Jaapio 86e24012a3 Merge remote-tracking branch 'warxcell/empty_var_name' 2017-08-29 21:37:41 +02:00