Commit Graph
169 Commits
Author SHA1 Message Date
Gautier DELEGLISE 93cfc743bd 💚 removed unecessary imports 2024-10-28 10:30:40 +01:00
Gautier DELEGLISE 992c829bad ♻️ cover more default value cases 2024-10-28 10:28:22 +01:00
Gautier DELEGLISE fde2b5916d method parameter default value rendering 2024-10-26 23:49:53 +02:00
Viktor Szépe ab86695010 Fix typos 2024-05-21 06:10:59 +00: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 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 f359e4f8ef Fix code style 2024-03-20 22:40:18 +01:00
Jaapio 7b2f618fe1 Add test for string value params
shows the correct behavior of #348

fixes #348
2024-03-20 22:16:52 +01:00
Jaapio fc9a2339f2 Implement fallback option for params without variable 2024-03-20 21:57:07 +01:00
Jaapio 98566f2504 Add typeless parameter support. 2024-03-12 22:49:26 +01:00
Jaapio c6d49fc451 Fix code style and bump to php 7.4 2024-03-12 22:28:53 +01:00
Aydin Hassan ae20798fde Fix rendering a description when it contains escaped characters and no tags 2023-10-11 14:57:53 +02:00
Jaapio 29e383a759 Fix issue with missing registered factory 2022-11-14 22:00:05 +01:00
Jaapio 1f95f3b735 Codestyle fixes and static analysis 2022-11-11 14:24:45 +01:00
Jaapio 6a92bc3ce9 Remove type logic from this package 2022-11-11 12:30:14 +01:00
Jaapio d6e90a3238 Add callable parameter support 2022-11-04 15:43:05 +01:00
Jaapio 50bf16734e Add support for constant types.
phpstan supports contant definitions and expressions to
link to constants.
2022-11-04 11:21:53 +01:00
Jaapio 81553b535f Add default types to method tag arguments 2022-10-28 22:37:28 +02:00
Jaapio e4ac07bc40 Add method support 2022-10-28 22:25:08 +02:00
Jaapio cfe9845260 Add property support 2022-10-28 21:07:34 +02:00
Jaapio 1dd491c8ec Add return tag factory 2022-10-28 16:47:01 +02:00
Jaapio 25d696587f Cleanup and var implementation 2022-10-28 16:27:10 +02:00
Jaapio b66b6dc644 Fix some php8+ issues 2022-10-28 14:54:08 +02:00
Jaapio d6c050a533 WIP 2022-10-28 14:05:33 +02:00
Fabien Villepinte 29ed9ae60d Support reference in method tag 2022-03-31 13:22:11 +00:00
Jaap van Otterdijk d708b18227 Merge pull request #299 from villfa/test/298
Tests: add a case to cover issue #298
2021-09-17 10:37:36 +02:00
Fabien Villepinte 98e82e39fa Tests: add a case to cover issue #298 2021-09-05 18:57:50 +00:00
Jaapio 6fa60f9f08 Fix code style 2021-08-26 22:32:25 +02:00
Jaapio bca4974b0b Make split platform independend 2021-08-26 22:31:30 +02:00
jrfnl 11315744bf CS: blank line between different use statement types 2021-08-08 19:41:03 +02:00
jrfnl a607236134 CS: no whitespace before return type colon 2021-08-08 19:41:03 +02:00
Jaap van Otterdijk ef02f64d74 Merge pull request #280 from jrfnl/feature/tests-fix-namespace
Tests: fix incorrect namespace
2021-08-01 22:17:39 +02:00
jrfnl 294709592f Tests: fix incorrect namespace 2021-08-01 04:33:44 +02:00
jrfnl 261f5b2a16 Tests: fix typo in test method name 2021-08-01 04:27:53 +02:00
Jaap van Otterdijk 99e3fb891c Merge pull request #260 from voku/get_tags_with_type_by_name
Get tags with type by name
2021-04-23 11:50:05 +02:00
Lars Moelleken c2889e4c40 code styles fixes only 2020-10-24 10:34:38 +02:00
Lars Moelleken 0722b31031 "StandardTagFactory" -> add more tests 2020-10-24 10:33:49 +02:00
Lars Moelleken 2b6310620c "Uses" -> add more test only 2020-10-24 10:33:38 +02:00
Lars Moelleken e31c62da4c "See" -> add more test + simplify the regex 2020-10-24 10:33:28 +02:00
Lars Moelleken 5a2dd88e14 "Link" -> add some more tests 2020-10-24 10:33:17 +02:00
Lars Moelleken 3b4c4d1c2c "CoversTest" -> add only one more test 2020-10-24 10:33:08 +02:00
Lars Moelleken 591f5935c9 code styles fixes only 2020-10-24 10:29:01 +02:00
Lars Moelleken 8c3953ef86 "DocBlock" -> add "getTagsWithTypeByName()"
-> because I saw errors like this ```Call to undefined method phpDocumentor\Reflection\DocBlock\Tags\InvalidTag::getType()```

-> https://github.com/Roave/BetterReflection/blob/5b4d1c53768e2a3bc32ab348752663733fd70546/src/TypesFinder/FindReturnType.php#L53
2020-10-24 10:27:35 +02:00
Lars Moelleken 4438ee7955 add more unit tests and normalize the "__toString" methods
-> fix code style + psalm reported errors
2020-09-03 02:38:39 +02:00
Lars Moelleken 4e6d7ecd03 add more unit tests and normalize the "__toString" methods v2 2020-09-03 02:06:24 +02:00
Lars Moelleken 7b7c22ddc3 Merge remote-tracking branch 'upstream/master' into fix_for_phpstorm_stubs
* upstream/master:
  Bump mockery
  Fix FQSEN resolving on see,covers,uses
  Improve test coverage
2020-09-03 00:41:27 +02:00
Lars Moelleken 97863e0c44 add more unit tests and normalize the "__toString" methods 2020-09-03 00:33:09 +02:00
Lars Moelleken bbe0f54877 add more unit tests and fixed the output v2 2020-09-02 22:55:00 +02:00
Jaapio 73650dde91 Fix FQSEN resolving on see,covers,uses
The See, Covers and Use tags can reference also methods, properties and
constants. Which means that the FqsenResolver cannot handle those properly.
This patch fixes that issue.
2020-09-02 22:48:30 +02:00
Jaapio 08c0b366d7 Improve test coverage 2020-09-02 22:46:14 +02:00