updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -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) {