From 470fc5303ce0251b6a5ba2031bbc4cdd41b3bcad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 15 Sep 2022 01:23:38 +0200 Subject: [PATCH] Changes: - added missing type-hints - added missing documentation - changed double-quotes to single - Setters do ALWAYS return void --- src/Object/Post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index a4a4831389..2f2def004e 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -783,7 +783,7 @@ class Post * @return Post|bool Last Post object or bool on any error * @throws \Exception */ - public function addChild(Post $item) + public function addChild(Post $post) { if (!$item->getId()) { Logger::error('Post object has no id', ['post' => $item]); @@ -807,8 +807,8 @@ class Post return false; } - $item->setParent($this); - $this->children[] = $item; + $post->setParent($this); + $this->children[] = $post; return end($this->children); } -- 2.39.5