Skip to content

Commit

Permalink
Adds support for PHP 7.4 arrow functions in PEAR.Functions.ValidDefau…
Browse files Browse the repository at this point in the history
…ltValue sniff

Related to #2523
  • Loading branch information
michalbundyra committed Nov 21, 2019
1 parent 68e0b06 commit e95c077
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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 @@ -98,5 +98,7 @@ $closure = function ($arg1, $arg2='hello') {};
// Invalid closure
$closure = function(array $arg2=array(), array $arg1) {}

$fn = fn($a = [], $b) => $a[] = $b;

// Intentional syntax error. Must be last thing in the file.
function
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function getErrorList()
81 => 1,
91 => 1,
99 => 1,
101 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit e95c077

Please sign in to comment.