Skip to content

Commit

Permalink
Adds PHP 7.4 fn closure surrpot in PSR12.Functions.ReturnTypeDeclaration
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Nov 19, 2019
1 parent 27a8445 commit d0d9ef8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function register()
return [
T_FUNCTION,
T_CLOSURE,
T_FN,
];

}//end register()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ function functionName(?string $arg1, ?int &$arg2):?string {}
function functionName(?string $arg1, ?int &$arg2): ?string {}
function functionName(?string $arg1, ?int &$arg2):
?string {}

fn (?\DateTime $arg) : ?\DateTime => $arg;
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ function functionName(?string $arg1, ?int &$arg2): ?string {}
function functionName(?string $arg1, ?int &$arg2): ?string {}
function functionName(?string $arg1, ?int &$arg2): ?string {}
function functionName(?string $arg1, ?int &$arg2): ?string {}

fn (?\DateTime $arg): ?\DateTime => $arg;
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected function getErrorList()
59 => 1,
60 => 1,
62 => 1,
64 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit d0d9ef8

Please sign in to comment.