From ea92b224cdae17d42bdff821a3b534e8b41a71a6 Mon Sep 17 00:00:00 2001 From: Michal Niewrzal Date: Tue, 29 Nov 2016 13:10:02 +0100 Subject: [PATCH] Symbols throws error for empty php file (#187) Closes #186 --- src/PhpDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpDocument.php b/src/PhpDocument.php index e24b9ac..575a5e6 100644 --- a/src/PhpDocument.php +++ b/src/PhpDocument.php @@ -325,7 +325,7 @@ class PhpDocument */ public function getDefinitions() { - return $this->definitions; + return $this->definitions ?? []; } /**