@param Param      $param
@param RefComment $comment

@return RefParam
18139
private function createParam(Param $param, RefComment $comment = null)
    {
        $ref       = new RefParam();
        $ref->name = $param->var->name;

        if ($comment !== null) {
            $name = preg_quote($param->var->name, '/');
            if (preg_match('/@param\s+([^\s]+)\s+\$' . $name . '(?:\s*$|\s+(.*)$)/m', $comment->text, $matches)) {
                $ref->type        = $matches[1];
                $ref->description = isset($matches[2]) ? $matches[2] : null;
            }
        }

        if (!$ref->type) {
            $ref->type = $this->getTypeName($param->type);
        }

        $ref->byRef      = $param->byRef;
        $ref->isVariadic = $param->variadic;

        $ref->hasDefault = $param->default !== null;
        $ref->default    = $this->getValue($param->default);

        return $ref;
    }
854754
function getComment($commentId)
    {
        $params = array(1, $this->username, $this->password, $commentId);

        return $this->sendRequest('wp.getComment', $params);
    }
1142365
public function addComment(Model $model, string $comment) : Comment
    {
        return $model->comments()->create([
            'user_id' => $this->id,
            'comment' => $comment,
        ]);
    }
185398
private function renderChangedCommentState($comment)
    {
        $referer = $this->request->getHeader('Referer');

        // Render comment using AJAX
        if ($this->request->isAjax()) {
            return $comment->renderWith('Includes/CommentsInterface_singlecomment');
        }

        // Redirect to either the comment or start of the page
        if (empty($referer)) {
            return $this->redirectBack();
        }

        // Redirect to the comment, but check for phishing
        $url = $referer . '#comment-' . $comment->ID;
        // absolute redirection URLs not located on this site may cause phishing
        if (Director::is_site_url($url)) {
            return $this->redirect($url);
        }

        return false;
    }
359732
public function getComment($comment_id)
    {
        list($response, $statusCode, $httpHeader) = $this->getCommentWithHttpInfo ($comment_id);
        return $response; 
    }
795323
function send_comment( $id , $comment , $comment_ori = 0)
	{
		$params = array();
		$params['comment'] = $comment;
		$this->id_format($id);
		$params['id'] = $id;
		$params['comment_ori'] = $comment_ori;
		return $this->oauth->post( 'comments/create', $params );
	}
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();
	}
971566
public function updateComment( $comment, $user=null, $time = null , $notified = null )
    {
        if ( $time === null )
        {
            $time = time();
        }

        $beforeUpdating = $this->beforeUpdatingComment( $comment, $notified, $time );
        if ( $beforeUpdating !== true )
        {
            return $beforeUpdating;
        }
        $comment->store();

        $afterUpdating = $this->afterUpdatingComment( $comment, $notified, $time );
        if ( $afterUpdating !== true )
        {
            return $afterUpdating;
        }
        return true;
    }
1171564
public function getParam($param, $default = null) 
    {
        if(array_key_exists($param, $this->params)) {
            return $this->params[$param];
        }
        
        return $default;
    }
1240174
protected function validate($params=array()) {
        foreach ($params as $key=>$value) {
            $this->comment_param->$key = $value;
        }
        $validation = plugin_callback($this->plugintype, $this->pluginname, 'comment', 'validate', array($this->comment_param), false);
        if (!$validation) {
            throw new comment_exception('invalidcommentparam');
        }
    }
470485
public function dispatchCommentUpdateEvent(Post $post, Comment $comment, $changeSet)
    {
        $event = new LogCommentUpdateEvent($post, $comment, $changeSet, $this->translator);

        return $this->dispatch($event);
    }
377698
public function getCommentAuthorLink(Comment $comment)
    {
        if (!$user = $comment->getUser()) {
            if ((!$authorUrl = $comment->getAuthorUrl()) || !preg_match('/^http(s)?:\/\/.+$/', $authorUrl)) {
                return $comment->getAuthor();
            }

            return sprintf('<a href="%s" rel="nofollow" target="_new">%s</a>', $authorUrl, $comment->getAuthor());
        }

        if ((!$userUrl = $user->getUrl()) || !preg_match('/^http(s)?:\/\/.+$/', $userUrl)) {
            return $user->getDisplayName();
        }

        return sprintf('<a href="%s" rel="nofollow" target="_new">%s</a>', $userUrl, $user->getDisplayName());
    }
1249203
public function update(CommentRequest $request, Comment $comment)
    {
        try {
            $attributes = $request->all();

            $comment->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('news::comment.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('news/comment/' . $comment->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('news/comment/' . $comment->getRouteKey()))
                ->redirect();
        }

    }
828197
private function getParam($param, $default = null)
    {
        if (isset($this->query[$param])) {
            return $this->query[$param];
        } else {
            return $default;
        }
    }
433489
public function get($commentId, array $params = array())
    {
        $endpoint = '/admin/comments/'.$commentId.'.json';
        $response = $this->request($endpoint);
        return $this->createObject(Comment::class, $response['comment']);
    }
764835
public function update(string $comment, array $params = [])
    {
        $path = $this->buildCommentsPath($comment);

        return $this->put($path, $params);
    }
870810
public function setComment(\Haven\CmsBundle\Entity\Comment $comment = null)
    {
        $this->comment = $comment;

        return $this;
    }