vscode-better-align
vscode-better-align copied to clipboard
php Code formatting error
Hey, when I try to format the code like this, the "=>" will fail to format
public static function getRefundStatusDesc($value = true) { $data = [ self::LAUNCH => '发起退款', self::WAIT => '未退款', self::FAIL => '退款失败', self::AGREE => '同意退款', self::REFUSE => '拒绝退款', ]; if ($value === true) { return $data; } return $data[$value]; } }
result:
public static function getRefundStatusDesc($value = true)
{
$data = [
self:: LAUNCH => '发起退款',
self:: WAIT => '未退款',
self:: FAIL => '退款失败',
self:: AGREE => '同意退款',
self:: REFUSE => '拒绝退款',
];
if ($value === true) {
return $data;
}
return $data[$value];
}
"::" with a space to the right, "=>" formatting has not taken effect
Could you please try install this one? And check if this fix your problem. https://github.com/chouzz/vscode-better-align/suites/10306798377/artifacts/506818699
You can install this extension by run Extensions: Install from VSIX command in the Command Palette
Could you please try install this one? And check if this fix your problem. https://github.com/chouzz/vscode-better-align/suites/10306798377/artifacts/506818699
You can install this extension by run Extensions: Install from VSIX command in the Command Palette
okay,The problem of installing this extension has been solved
OK. This will be fixed in next version.