updated packages
This commit is contained in:
@@ -260,6 +260,10 @@ class Standard extends PrettyPrinterAbstract
|
||||
return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr);
|
||||
}
|
||||
|
||||
protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) {
|
||||
return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr);
|
||||
}
|
||||
|
||||
// Binary expressions
|
||||
|
||||
protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) {
|
||||
@@ -435,7 +439,15 @@ class Standard extends PrettyPrinterAbstract
|
||||
}
|
||||
|
||||
protected function pExpr_Cast_Double(Cast\Double $node) {
|
||||
return $this->pPrefixOp(Cast\Double::class, '(double) ', $node->expr);
|
||||
$kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE);
|
||||
if ($kind === Cast\Double::KIND_DOUBLE) {
|
||||
$cast = '(double)';
|
||||
} elseif ($kind === Cast\Double::KIND_FLOAT) {
|
||||
$cast = '(float)';
|
||||
} elseif ($kind === Cast\Double::KIND_REAL) {
|
||||
$cast = '(real)';
|
||||
}
|
||||
return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr);
|
||||
}
|
||||
|
||||
protected function pExpr_Cast_String(Cast\String_ $node) {
|
||||
@@ -680,7 +692,9 @@ class Standard extends PrettyPrinterAbstract
|
||||
}
|
||||
|
||||
protected function pStmt_Property(Stmt\Property $node) {
|
||||
return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . $this->pCommaSeparated($node->props) . ';';
|
||||
return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags))
|
||||
. ($node->type ? $this->p($node->type) . ' ' : '')
|
||||
. $this->pCommaSeparated($node->props) . ';';
|
||||
}
|
||||
|
||||
protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) {
|
||||
|
||||
Reference in New Issue
Block a user