From: Roland Häder Date: Wed, 14 Sep 2022 23:23:38 +0000 (+0200) Subject: Changes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=470fc5303ce0251b6a5ba2031bbc4cdd41b3bcad;p=friendica.git Changes: - added missing type-hints - added missing documentation - changed double-quotes to single - Setters do ALWAYS return void --- 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); }