From 1f95f9215c6072e5eb99b425fff9947a2f026116 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 12 Jan 2019 17:28:53 +0100 Subject: [PATCH] Tweak type annotation to include null --- CHANGELOG.md | 3 ++- lib/PhpParser/Builder/Property.php | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7198563..c1ad51e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ Version 4.2.0-dev ### Added -* [PHP 7.4] Add support for typed properties through a new `type` subnode of `Stmt\Property`. (#567) +* [PHP 7.4] Add support for typed properties through a new `type` subnode of `Stmt\Property`. + Additionally `Builder\Property` now has a `setType()` method. (#567) * Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`, `(double)` and `(real)`. The form of the cast will be preserved by the pretty printer. (#565) diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 5028dd8..1f3bdb2 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -17,9 +17,7 @@ class Property implements PhpParser\Builder protected $default = null; protected $attributes = []; - /** - * @var Identifier|Name|NullableType - */ + /** @var null|Identifier|Name|NullableType */ protected $type; /**