Commit Graph
24 Commits
Author SHA1 Message Date
Viktor Szépe ab86695010 Fix typos 2024-05-21 06:10:59 +00:00
Jaapio 8c422ab43b Fix docblock tag descriptions
Newlines and whitespaces were not handled as before. This caused
issues for some users because our indent-recuction was broken.
The cause seems to be an upstream issue in phpstan parser which
is not resolved yet. But this work around post processing the tokens
helps us to make it work as before.
2024-05-21 07:50:53 +02:00
Jaapio 518be131c0 Bugfix: resolve issue with multiline descriptions
The phpstan parser is not consuming the full description when parsing
docblocks with a more complex description. For them it's mostlikely not an
issue as phpstan doesn't use the descriptions. But it will also parse
the descriptions into unexpected tags. This could be an advantage but is
not according to the phpdoc spec.

Our own tokenizer is already tokenizing the docblocks into the correct parts.
So all we needed to do is assume all remaining tokens in the phpstan ast belong
to the description. From there our own code is able to handle this as before in
v5.3.

fixes #365
2024-05-08 20:49:40 +02:00
Jaapio 08acd34f7e Add test for constant references. 2024-04-08 22:15:57 +02:00
Jaapio edd5f67143 Be more strict about type definitions on param
Throw on invalid type definitions and unexpected type definitions.
Not all types resolved by phpstan's parser are valid for docblocks,
they might in a more complex type system but I do not see how these
types would ever apply to param tags.
2024-04-08 21:38:01 +02:00
Jaapio 98566f2504 Add typeless parameter support. 2024-03-12 22:49:26 +01:00
Jaapio 29e383a759 Fix issue with missing registered factory 2022-11-14 22:00:05 +01:00
Jaapio d6c050a533 WIP 2022-10-28 14:05:33 +02:00
Jaapio bca4974b0b Make split platform independend 2021-08-26 22:31:30 +02:00
Jaapio aee984014b Apply new code style 2019-09-20 10:54:12 +02:00
Chuck Burgess d9952bd114 initialize variables before include, so that var tag usage is normal 2018-01-29 14:03:51 -06:00
Chuck Burgess 7bd0e7e4a1 extra space 2018-01-07 09:09:21 -06:00
Chuck Burgess 2f482c78b0 add tests for bug #63; 2018-01-07 08:50:54 -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
TomasVotruba 4a9675841b add PHP 7.1 typehints 2017-11-30 10:27:01 +01:00
TomasVotruba a1d8751ad6 tests: add strict_types and typehints, remove tests that are now covered by typehints 2017-11-30 10:27:01 +01:00
Gabriel Caruso 7524aba21f Fix tests 2017-11-15 08:29:42 +01:00
Gabriel Caruso c006d4a2d5 Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-15 08:29:42 +01:00
TomasVotruba a872e515bb [cs] add and apply psr2 2017-11-12 21:23:54 +01:00
Mike van Riel ed4c6b77ab Write example on escaping values in a DocBlock 2015-06-28 19:49:32 +02:00
Mike van Riel a6ffa93e28 Add example and functional test for reconstituting a DocBlock 2015-06-27 16:47:47 +02:00
Mike van Riel cff8a80680 Add integration test and example on how to read tags 2015-06-24 22:50:12 +02:00
Mike van Riel 97c3735b32 Add first integration test 2015-06-24 08:42:24 +02:00