]> 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>
Mon, 23 Jun 2025 20:53:14 +0000 (22:53 +0200)
- added missing type-hints
- added missing documentation
- changed double-quotes to single
- Setters do ALWAYS return void

src/Object/Post.php

index b4fcfcc094d0acb4d51902026f91dcce8c0c3e96..a07c8d07e2c466f48900e0ed873415f9c420945a 100644 (file)
@@ -790,7 +790,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()) {
                        DI::logger()->error('Post object has no id', ['post' => $item]);
@@ -814,8 +814,8 @@ class Post
                        return false;
                }
 
-               $item->setParent($this);
-               $this->children[] = $item;
+               $post->setParent($this);
+               $this->children[] = $post;
 
                return end($this->children);
        }