File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 "dependencies" : {
1414 "linguist-languages" : " ^7.5.1" ,
1515 "mem" : " ^8.0.0" ,
16- "php-parser" : " 3.1.0-beta.5 "
16+ "php-parser" : " 3.1.0-beta.7 "
1717 },
1818 "devDependencies" : {
1919 "@babel/preset-env" : " ^7.16.11" ,
Original file line number Diff line number Diff line change @@ -61,6 +61,21 @@ final class DomainEventMessage
6161 }
6262}
6363
64+ #[
65+ Attr1(Attr1::FOO | Attr1::BAR),
66+ Attr2(-20 * 5 + 10)
67+ ]
68+ class A { }
69+
70+ class ValueModel
71+ {
72+ #[
73+ Assert \\NotBlank (allowNull : false , groups : [' foo' ]),
74+ Assert \\Length (max : 255 , groups : [' foo' ]),
75+ ]
76+ public ? string $value = null ;
77+ }
78+
6479==================================== = output ==================================== =
6580< ? php
6681
@@ -150,5 +165,19 @@ final class DomainEventMessage
150165 }
151166}
152167
168+ #[Attr1 (Attr1 ::FOO | Attr1 ::BAR ), Attr2 (- 20 * 5 + 10 )]
169+ class A
170+ {
171+ }
172+
173+ class ValueModel
174+ {
175+ #[
176+ Assert \\NotBlank (allowNull : false , groups : [" foo" ]),
177+ Assert \\Length (max : 255 , groups : [" foo" ])
178+ ]
179+ public ? string $value = null ;
180+ }
181+
153182================================================================================
154183` ;
Original file line number Diff line number Diff line change @@ -52,3 +52,18 @@ public function getPayload1(): string
5252 return "555 " ;
5353 }
5454}
55+
56+ #[
57+ Attr1(Attr1::FOO | Attr1::BAR ),
58+ Attr2(-20 * 5 + 10 )
59+ ]
60+ class A {}
61+
62+ class ValueModel
63+ {
64+ #[
65+ Assert \NotBlank(allowNull: false , groups: ['foo ' ]),
66+ Assert \Length(max: 255 , groups: ['foo ' ]),
67+ ]
68+ public ?string $ value = null ;
69+ }
Original file line number Diff line number Diff line change @@ -10,12 +10,19 @@ printWidth: 80
1010function generateSlug(HasTitle& HasId $post) {
1111 return strtolower ($post - > getTitle ()) . $post - > getId ();
1212}
13+
14+ function test(foo|bar & $input) { }
15+
1316=====================================output=====================================
1417<?php
1518function generateSlug(HasTitle& HasId $post)
1619{
1720 return strtolower ($post - > getTitle ()) . $post - > getId ();
1821}
1922
23+ function test(foo|bar & $input)
24+ {
25+ }
26+
2027================================================================================
2128` ;
Original file line number Diff line number Diff line change 11<?php
22function generateSlug (HasTitle &HasId $ post ) {
33 return strtolower ($ post ->getTitle ()) . $ post ->getId ();
4- }
4+ }
5+
6+ function test (foo |bar &$ input ) {}
Original file line number Diff line number Diff line change 11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
3+ exports [` keywords.php 1` ] = `
4+ ====================================options=====================================
5+ parsers: ["php"]
6+ printWidth: 80
7+ | printWidth
8+ =====================================input======================================
9+ <?php
10+ namespace Base\\ Test\\ To\\ Extend;
11+
12+ use Name\\ Space\\ Enum;
13+ use App\\ Entity\\ Interface\\ EntityInterface;
14+ use \\ Foo\\ Trait\\ Bar;
15+
16+ =====================================output=====================================
17+ <?php
18+ namespace Base\\ Test\\ To\\ Extend;
19+
20+ use Name\\ Space\\ Enum;
21+ use App\\ Entity\\ Interface\\ EntityInterface;
22+ use Foo\\ Trait\\ Bar;
23+
24+ ================================================================================
25+ ` ;
26+
327exports [` namespace.php 1` ] = `
428====================================options=====================================
529parsers: ["php"]
Original file line number Diff line number Diff line change 1+ <?php
2+ namespace Base \Test \To \Extend ;
3+
4+ use Name \Space \Enum ;
5+ use App \Entity \Interface \EntityInterface ;
6+ use \Foo \Trait \Bar ;
Original file line number Diff line number Diff line change @@ -3689,10 +3689,10 @@ path-type@^4.0.0:
36893689 resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
36903690 integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
36913691
3692- php-parser@3.1.0-beta.5 :
3693- version "3.1.0-beta.5 "
3694- resolved "https://registry.yarnpkg.com/php-parser/-/php-parser-3.1.0-beta.5 .tgz#81fd04ede37f3796ba2585b985831caffd62ba50 "
3695- integrity sha512-3F3+yThjD7wn0sMuIG5iMQqutmH+RJUAbEyPW5S/greTp5ZArkpEweylQh+do22q9UJlJT1PrLN/AwnzDUti6Q ==
3692+ php-parser@3.1.0-beta.7 :
3693+ version "3.1.0-beta.7 "
3694+ resolved "https://registry.yarnpkg.com/php-parser/-/php-parser-3.1.0-beta.7 .tgz#8df7d100a547b128e573a60980e332cd6e7a1e71 "
3695+ integrity sha512-d0Ic+st1I5ZxQ6sSv79dtWNTK4oT35JxA0G2yb/A4Kyi82TwUEEeCkyQu7GZ2tDP2QIVVuJoABLR2mXJXU9+wQ ==
36963696
36973697picocolors@^1.0.0 :
36983698 version "1.0.0"
You can’t perform that action at this time.
0 commit comments