vscode-phpfmt: adding "public" to closure and global functions causes syntax error

Route::get('{path}', function  () {
    return redirect()->route('home');
})->where('path', '.*');

gets formatted to

Route::get('{path}', public function  () {
    return redirect()->route('home');
})->where('path', '.*');

which causes syntax error.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 21

Commits related to this issue

Most upvoted comments

Hello again, this should be already fixed. Please update to the latest version and kindly tell me if you find it fixed.

Thanks!

Thanks @d-enk I’ve been able to reproduce the bug with your latest example.