refactoring: short int cast
This commit is contained in:
parent
115d481a57
commit
69919594fd
@ -1878,7 +1878,7 @@ func (f *formatter) ExprCastDouble(n *ast.ExprCastDouble) {
|
||||
}
|
||||
|
||||
func (f *formatter) ExprCastInt(n *ast.ExprCastInt) {
|
||||
n.CastTkn = f.newToken(token.T_INT_CAST, []byte("(integer)"))
|
||||
n.CastTkn = f.newToken(token.T_INT_CAST, []byte("(int)"))
|
||||
n.Expr.Accept(f)
|
||||
}
|
||||
|
||||
|
@ -6309,7 +6309,7 @@ func TestFormatter_ExprCastInt(t *testing.T) {
|
||||
p := visitor.NewPrinter(o).WithState(visitor.PrinterStatePHP)
|
||||
n.Accept(p)
|
||||
|
||||
expected := `(integer)$foo`
|
||||
expected := `(int)$foo`
|
||||
actual := o.String()
|
||||
|
||||
if expected != actual {
|
||||
|
@ -1152,7 +1152,7 @@ func (p *printer) ExprCastDouble(n *ast.ExprCastDouble) {
|
||||
}
|
||||
|
||||
func (p *printer) ExprCastInt(n *ast.ExprCastInt) {
|
||||
p.printToken(n.CastTkn, []byte("(integer)"))
|
||||
p.printToken(n.CastTkn, []byte("(int)"))
|
||||
p.printNode(n.Expr)
|
||||
}
|
||||
|
||||
|
@ -1447,7 +1447,7 @@ func TestPrinterPrintInt(t *testing.T) {
|
||||
}
|
||||
n.Accept(p)
|
||||
|
||||
expected := `(integer)$var`
|
||||
expected := `(int)$var`
|
||||
actual := o.String()
|
||||
|
||||
if expected != actual {
|
||||
|
Loading…
Reference in New Issue
Block a user