We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettier 2.0.0
PHP Plugin 0.18.4
"prettier": { "phpVersion": "8.0", "useTabs": true, "singleQuote": true }
Input:
$measurement = (fn($m): Measurement => $m)(Measurement::query()->find($id, ['time', 'raw_gyro']));
Output:
$measurement = fn($m): Measurement => $m( Measurement::query()->find($id, ['time', 'raw_gyro']), );
Expected behavior: Won't broke the code.
The text was updated successfully, but these errors were encountered:
Yes, it appears the closure is being unwrapped at some point.
Simpler example
$a = (fn() => 0)(1);
becomes
$a = fn() => 0(1);
This could be a bug in the PHP parser that is used by us
Sorry, something went wrong.
Seeing this bug as well
{ "phpVersion": "8.1", "printWidth": 80, "tabWidth": 4, "useTabs": false, "singleQuote": false, "trailingCommaPHP": true, "braceStyle": "psr-2", "requirePragma": false, "insertPragma": false }
Released in 0.19.1 🎉
0.19.1
No branches or pull requests
Prettier 2.0.0
PHP Plugin 0.18.4
Input:
Output:
Expected behavior:
Won't broke the code.
The text was updated successfully, but these errors were encountered: