mirror of
https://github.com/Karaka-Management/oms-Comments.git
synced 2026-02-15 16:58:43 +00:00
cleanup and tests added for ci/cd
This commit is contained in:
parent
8b700d9e30
commit
c273cd8895
|
|
@ -70,51 +70,131 @@ class Comment
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference id
|
||||||
|
*
|
||||||
|
* @param mixed $ref Reference
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setRef($ref) : void
|
public function setRef($ref) : void
|
||||||
{
|
{
|
||||||
$this->ref = $ref;
|
$this->ref = $ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the reference
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getRef()
|
public function getRef()
|
||||||
{
|
{
|
||||||
return $this->ref;
|
return $this->ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the list this comment belongs to
|
||||||
|
*
|
||||||
|
* @param mixed $list List
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setList($list) : void
|
public function setList($list) : void
|
||||||
{
|
{
|
||||||
$this->list = $list;
|
$this->list = $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the list this comment belongs to
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getList()
|
public function getList()
|
||||||
{
|
{
|
||||||
return $this->list;
|
return $this->list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the title
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getTitle() : string
|
public function getTitle() : string
|
||||||
{
|
{
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the title
|
||||||
|
*
|
||||||
|
* @param string $title Title
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setTitle(string $title) : void
|
public function setTitle(string $title) : void
|
||||||
{
|
{
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the content
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getContent() : string
|
public function getContent() : string
|
||||||
{
|
{
|
||||||
return $this->content;
|
return $this->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the content
|
||||||
|
*
|
||||||
|
* @param string $content Content
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setContent(string $content) : void
|
public function setContent(string $content) : void
|
||||||
{
|
{
|
||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the raw content
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getContentRaw() : string
|
public function getContentRaw() : string
|
||||||
{
|
{
|
||||||
return $this->contentRaw;
|
return $this->contentRaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the raw content
|
||||||
|
*
|
||||||
|
* @param string $contentRaw Content
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setContentRaw(string $contentRaw) : void
|
public function setContentRaw(string $contentRaw) : void
|
||||||
{
|
{
|
||||||
$this->contentRaw = $contentRaw;
|
$this->contentRaw = $contentRaw;
|
||||||
|
|
@ -132,6 +212,15 @@ class Comment
|
||||||
return $this->createdBy;
|
return $this->createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the creator
|
||||||
|
*
|
||||||
|
* @param mixed $createdBy Creator
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setCreatedBy($createdBy) : void
|
public function setCreatedBy($createdBy) : void
|
||||||
{
|
{
|
||||||
$this->createdBy = $createdBy;
|
$this->createdBy = $createdBy;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,12 @@ class CommentList
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
protected int $id = 0;
|
||||||
|
|
||||||
private $comments = [];
|
/**
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private array $comments = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
|
|
@ -46,11 +51,27 @@ class CommentList
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the comments
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getComments() : array
|
public function getComments() : array
|
||||||
{
|
{
|
||||||
return $this->comments;
|
return $this->comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a comment
|
||||||
|
*
|
||||||
|
* @param mixed $comment Comment
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function addComment($comment) : void
|
public function addComment($comment) : void
|
||||||
{
|
{
|
||||||
$this->comments[] = $comment;
|
$this->comments[] = $comment;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user