Commit Graph

84 Commits

Author SHA1 Message Date
Richard van Velzen
6cafed9212 Add negated assertions 2022-05-04 09:46:54 +02:00
Richard van Velzen
47051f5ca6 Parse assert-if-true and assert-if-false as well 2022-05-04 09:46:54 +02:00
Richard van Velzen
8f703ba724 Add assert syntax 2022-05-04 09:46:54 +02:00
Richard van Velzen
129a63b3bc
Extend allowed types for conditional for parameter 2022-04-22 13:11:01 +02:00
Richard van Velzen
4cb3021a4e Support multiline parenthesized types
This includes union, intersection, and conditional types
2022-03-30 15:33:37 +02:00
Richard van Velzen
445ccb723c
Support conditional types
* Support conditional types

Part of implementation for phpstan/phpstan#3853

* Add fuzzy tests

* Only support "is" / "is not"

* Rename trueType/falseType to if/else

* Add tests to TypeParserTest

* cs

* Only allow parenthesized conditional types

* Remove multiline support

It'll be easier to implement this for more types properly separately

* Support conditional for parameters
2022-03-28 12:50:35 +02:00
Richard van Velzen
c08946968b Support multiline callable syntax
Closes #46. Tests are basically copied and modified from #44
2022-03-28 09:53:31 +02:00
Renovate Bot
d5a6692b8a Update dependency slevomat/coding-standard to v7 2022-02-08 12:41:11 +01:00
Ondrej Mirtes
dbc093d7af
Fix BC break vs. 1.0.0 2021-09-16 22:46:02 +02:00
Ondrej Mirtes
d26926e2ac
Fix build 2021-09-16 22:35:29 +02:00
Jordi Boggiano
605e3697d7 Fix wildcard parsing to end if a space follows, fixes phpstan/phpstan#5628 2021-09-16 22:28:27 +02:00
Vincent Langlet
d622b7c550 Add support for reference in phpdoc 2021-09-16 22:27:44 +02:00
Jordi Boggiano
816e826ce0 Allow parsing class constants with more than one wildcard in the constant name 2021-09-12 13:52:00 +02:00
Ondrej Mirtes
ea0b17460e
Allow empty array shape 2021-06-11 15:24:46 +02:00
Jiří Pudil
e352d065af type aliases: detect unsupported targets of type alias imports on parsing level 2021-04-03 16:46:19 +02:00
Ondrej Mirtes
2269e47626
Catch parse exception when consuming TOKEN_CLOSE_PHPDOC 2021-03-22 18:32:47 +01:00
Jaroslav Hanslík
cf4fc7d2ae
Fixed "Undefined array key -1" 2021-03-19 11:54:14 +01:00
Jan Tvrdik
b451b2f27a Preserve whitespace formatting of text nodes 2021-03-15 09:55:35 +01:00
Jiří Pudil
2e17e4a907 type aliases: support @phpstan-import-type and @psalm-import-type tags 2021-02-28 15:30:10 +01:00
Jiří Pudil
2d862ef746 type aliases: support @phpstan-type and @psalm-type tags 2021-02-28 15:30:10 +01:00
Sebastian Schreiber
2ce4c66233
[TASK] Add testcase for docblock with number (#61)
Relates: #59
2021-02-19 12:57:27 +01:00
Jaroslav Hanslík
1948aa842a Fixed parsing description started with HTML tag 2020-06-10 07:04:41 +02:00
Andreas Frömer
44500ca1b7 Add support for trailing comma 2020-05-06 08:52:35 +02:00
Andreas Frömer
9efbbb656a Add possibility for leading comma 2020-05-06 08:52:35 +02:00
Andreas Frömer
ba7df7e621 Add test for docblock parsing 2020-05-06 08:52:35 +02:00
Andreas Frömer
c8fef049d3 Update Codestyle issues 2020-05-06 08:52:35 +02:00
Andreas Frömer
b205ccdf21 Add multiline generic support
This solves #42
2020-05-06 08:52:35 +02:00
Ondrej Mirtes
7093385390
Fix CS 2020-05-04 22:59:45 +02:00
Ondrej Mirtes
d840b6956b
Fix parsing const fetches with wildcard in complex types 2020-05-04 22:48:07 +02:00
Ondrej Mirtes
d4c4cd3cae
Test parseTagValue() with ConstTypeNode 2020-05-04 11:11:57 +02:00
Ondrej Mirtes
956e7215c7
Support for parsing @mixin Type [description] 2020-05-02 09:04:38 +02:00
Ondrej Mirtes
fde6cca6d9
ConstFetchNode - supports all constants wildcard 2020-04-30 19:38:30 +02:00
Ondrej Mirtes
3170d7d858
Wildcard constants 2020-04-30 16:24:29 +02:00
Ondrej Mirtes
d60ff778be
Support ConstExprNode as type 2020-04-30 15:52:09 +02:00
Ondrej Mirtes
c3aaad7ef5
How is callable type node with mixed variadic argument parsed? 2020-04-25 14:17:29 +02:00
Ondrej Mirtes
97a0114d7f
Array shapes - support single-quoted and double-quoted strings 2020-04-13 18:19:13 +02:00
Ondrej Mirtes
48f94ddb9b
Fix build 2020-02-27 03:29:44 +01:00
Ondrej Mirtes
e2b89c5119
Some extra tests for callable syntax 2020-02-27 02:26:54 +01:00
Ilija Tovilo
928179efc5 Fix parsing of [] in various cases - closes #36
* Array shapes
* Generics
* $this
* Nullables
2020-01-25 21:42:48 +01:00
Ondrej Mirtes
a6d1352464
Fix @var tag with $this 2019-12-13 13:03:22 +01:00
Ondrej Mirtes
0331e880c0
Reserve @use for generic traits instead of @uses (which already has meaning in PHP projects) 2019-12-05 21:43:52 +01:00
Ondrej Mirtes
62c6de624f
@template T as bound 2019-11-18 23:11:38 +01:00
Arnaud Le Blanc
3edb51540b Add @template-covariant support 2019-11-07 10:39:17 +01:00
Max Loeb
18b0e92b63 lint 2019-10-26 21:40:39 +02:00
Max Loeb
8a1b0c7090 commas on next line 2019-10-26 21:40:39 +02:00
Max Loeb
e81bfd8679 support trailing commas 2019-10-26 21:40:39 +02:00
Max Loeb
f9e4a3b8cb single comma 2019-10-26 21:40:39 +02:00
Max Loeb
487a6975be add test with asterisks 2019-10-26 21:40:39 +02:00
Max Loeb
c8ffa3e787 consume newlines 2019-10-26 21:40:39 +02:00
Jan Tvrdik
b3040ade88 TemplateTagValueNode: $bound is nullable 2019-10-06 13:28:39 +02:00