File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed
src/Languages/Php/Patterns Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 55- Fix for static property types (#129 )
66- Fix for attribute in promoted property (#133 )
77- Fix for comments in function argument lists (#134 )
8+ - Fix for variadic types (#140 )
89
910## 2.8.2
1011
Original file line number Diff line number Diff line change 1515#[PatternTest(input: 'Foo|Bar|null $bar ' , output: 'Foo|Bar|null ' )]
1616#[PatternTest(input: '(Foo&Bar)|null $bar ' , output: '(Foo&Bar)|null ' )]
1717#[PatternTest(input: 'string|\Stringable $bar ' , output: 'string|\Stringable ' )]
18+ #[PatternTest(input: 'Foo ...$params ' , output: 'Foo ' )]
1819final readonly class TypeForVariablePattern implements Pattern
1920{
2021 use IsPattern;
2122
2223 public function getPattern (): string
2324 {
24- return '(?<match>[\w\&\(\)\| \\\\\?]+)\s+ \\$ ' ;
25+ return '(?<match>[\w\&\(\)\| \\\\\?]+)\s+(\.*) \\$ ' ;
2526 }
2627
2728 public function getTokenType (): TokenTypeEnum
Original file line number Diff line number Diff line change 11``` php
2- public function __construct(
3- // Allow a union on a special "missing relation" type:
4- public Relation|Author $author,
5-
6- // Making the relation nullable would be an option as well:
7- /** @var Chapter[] $chapters */
8- /**
9- * hello */
10- public ?array $chapters,
11- ) {}
2+ public function update(Foo ...$params): self;
123```
You can’t perform that action at this time.
0 commit comments