From f9ced3ada0d6f4a3d2dd3de65a7f5c6279037ae8 Mon Sep 17 00:00:00 2001 From: farid saravi Date: Sun, 14 Jul 2019 18:54:57 +0430 Subject: [PATCH] add HasMany and BelongsTo return types --- src/NodeTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NodeTrait.php b/src/NodeTrait.php index b921984..fcca698 100644 --- a/src/NodeTrait.php +++ b/src/NodeTrait.php @@ -224,7 +224,7 @@ public function refreshNode() * * @return BelongsTo */ - public function parent() + public function parent() : BelongsTo { return $this->belongsTo(get_class($this), $this->getParentIdName()) ->setModel($this); @@ -235,7 +235,7 @@ public function parent() * * @return HasMany */ - public function children() + public function children() : HasMany { return $this->hasMany(get_class($this), $this->getParentIdName()) ->setModel($this);