]> git.mxchange.org Git - friendica.git/commitdiff
Changes:
authorRoland Häder <roland@mxchange.org>
Wed, 14 Sep 2022 23:23:38 +0000 (01:23 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 17 Jan 2024 00:03:00 +0000 (01:03 +0100)
- added missing type-hints
- added missing documentation
- changed double-quotes to single
- Setters do ALWAYS return void

src/Object/Post.php

index a4a4831389965c8b92ce88a3e96c86228ff2173c..2f2def004e823cfbd7f1661283a07829f66d129b 100644 (file)
@@ -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);
        }