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
michalbundyra committed Nov 19, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 27a8445 commit d0d9ef8
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ public function register()
return [
T_FUNCTION,
T_CLOSURE,
T_FN,
];

}//end register()
Original file line number Diff line number Diff line change
@@ -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
@@ -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
@@ -37,6 +37,7 @@ protected function getErrorList()
59 => 1,
60 => 1,
62 => 1,
64 => 1,
];

}//end getErrorList()

0 comments on commit d0d9ef8

Please sign in to comment.