Add comment.

@param \Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment

@return Shipping
329316
public function addComment(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment)
    {
        $this->comments[] = $comment;

        return $this;
    }
793898
public function comment(string $comment = ''): Writer
    {
        $comment = trim($comment);

        if (!empty($comment)) {
            $comment = ' ' . $comment;
        }

        return $this->line(trim('#' . $comment));
    }
1074698
public function comment( $comment = '#' )
    {
        foreach( $this->lines as &$line ) {
            $line = $comment . $line;
        }
        return $this;
    }
127227
public function addComment($shipmentIncrementId, $comment = null, $email = null, $includeInEmail = null)
    {
        return $this->__createAction('order_shipment.addComment', func_get_args());
    }
1050744
public static function create($comment) {
    $comment = trim($comment);
    $lines = array_map('trim', explode("\n", $comment));
    $text = "/**\n";
    foreach ($lines as $i => $line) {
      $text .= ' * ' . $line . "\n";
    }
    $text .= ' */';
    return new DocCommentNode(T_DOC_COMMENT, $text);
  }
1344796
function newComment($post_id, array $comment)
    {
        $params = array(1, $this->username, $this->password, $post_id, $comment);

        return $this->sendRequest('wp.newComment', $params);
    }
397490
public static function create($comment) {
    $comment = trim($comment);
    $nl_count = substr_count($comment, "\n");
    if ($nl_count > 1) {
      return LineCommentBlockNode::create($comment);
    }
    else {
      return new CommentNode(T_COMMENT, '// ' . $comment . "\n");
    }
  }
976628
public function removeComment(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment)
    {
        return $this->comments->removeElement($comment);
    }
849388
public function reply($comment)
    {
        $parameter = new ClientValueObject();
        $parameter->setProperty("Comment",$comment);
        $qry = new InvokePostMethodQuery($this->getResourcePath(),"Reply",null,$parameter);
        $this->getContext()->addQuery($qry);
    }
1153400
public function setComment($comment): self
    {
        if (!empty($comment)) {
            if (is_array($comment)) {
                $this->docComment->setLines($comment);
            } elseif (is_string($comment)) {
                $this->docComment->setString($comment);
            }
        }

        return $this;
    }
1202729
public function create( $comment, $config = [] ) {

		$modelClass = static::$modelClass;

		$comment->agent	= Yii::$app->request->userAgent;
		$comment->ip	= Yii::$app->request->userIP;

		// Default New
		$comment->status = $comment->status ?? $modelClass::STATUS_NEW;

		return parent::create( $comment, $config );
	}
834580
public function serialize(Comment $comment, array $options = [])
    {
        $user = $comment->getUser();

        $serialized = [
            'id' => $comment->getUuid(),
            'content' => $comment->getContent(),
            'status' => $comment->getStatus(),
            'creationDate' => $comment->getCreationDate() ? $comment->getCreationDate()->format('Y-m-d H:i:s') : null,
            'editionDate' => $comment->getEditionDate() ? $comment->getEditionDate()->format('Y-m-d H:i:s') : null,
            'user' => $user ? $this->userSerializer->serialize($user, [Options::SERIALIZE_MINIMAL]) : null,
        ];

        return $serialized;
    }
334512
public function addComment(Comment $comment)
    {
        if (!$this->comments->contains($comment)) {
            $this->comments->add($comment);
        }
    }
764835
public function update(string $comment, array $params = [])
    {
        $path = $this->buildCommentsPath($comment);

        return $this->put($path, $params);
    }
181093
private function updateFromPostCache(Comment $comment, $c)
    {
        if ($comment->postId == null)
        {
            return;
        }
        if ($this->postCache == null || $this->postCache['ID'] != $comment->postId)
        {
            $this->postCache = $this->adminApi->getPost($comment->postId);
        }

        $comment->date = $this->getMetaKeyValue($this->postCache, "linkoscope_created_$comment->id") ?: $c['date'];
        $comment->score =
            $this->getMetaKeyValue($this->postCache, "linkoscope_score_$comment->id") ?: strtotime($c['date']);
    }
1058323
public function addComment($comment)
	{
		if(Yii::app()->params['commentNeedApproval'])
			$comment->status=Comment::STATUS_PENDING;
		else
			$comment->status=Comment::STATUS_APPROVED;
		$comment->post_id=$this->id;
		return $comment->save();
	}
38519
public static function create($comment) {
    $block_comment = new LineCommentBlockNode();
    $comment = trim($comment);
    $lines = array_map('rtrim', explode("\n", $comment));
    foreach ($lines as $line) {
      $comment_node = new CommentNode(T_COMMENT, '// ' . $line . "\n");
      $block_comment->addChild($comment_node);
    }
    return $block_comment;
  }