cleanup and tests added for ci/cd

This commit is contained in:
Dennis Eichhorn 2019-11-20 22:28:04 +01:00
parent 8b700d9e30
commit c273cd8895
2 changed files with 111 additions and 1 deletions

View File

@ -70,51 +70,131 @@ class Comment
return $this->id;
}
/**
* Reference id
*
* @param mixed $ref Reference
*
* @return void
*
* @since 1.0.0
*/
public function setRef($ref) : void
{
$this->ref = $ref;
}
/**
* Get the reference
*
* @return mixed
*
* @since 1.0.0
*/
public function getRef()
{
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
{
$this->list = $list;
}
/**
* Get the list this comment belongs to
*
* @return mixed
*
* @since 1.0.0
*/
public function getList()
{
return $this->list;
}
/**
* Get the title
*
* @return string
*
* @since 1.0.0
*/
public function getTitle() : string
{
return $this->title;
}
/**
* Set the title
*
* @param string $title Title
*
* @return void
*
* @since 1.0.0
*/
public function setTitle(string $title) : void
{
$this->title = $title;
}
/**
* Get the content
*
* @return string
*
* @since 1.0.0
*/
public function getContent() : string
{
return $this->content;
}
/**
* Get the content
*
* @param string $content Content
*
* @return void
*
* @since 1.0.0
*/
public function setContent(string $content) : void
{
$this->content = $content;
}
/**
* Get the raw content
*
* @return string
*
* @since 1.0.0
*/
public function getContentRaw() : string
{
return $this->contentRaw;
}
/**
* Set the raw content
*
* @param string $contentRaw Content
*
* @return void
*
* @since 1.0.0
*/
public function setContentRaw(string $contentRaw) : void
{
$this->contentRaw = $contentRaw;
@ -132,6 +212,15 @@ class Comment
return $this->createdBy;
}
/**
* Set the creator
*
* @param mixed $createdBy Creator
*
* @return void
*
* @since 1.0.0
*/
public function setCreatedBy($createdBy) : void
{
$this->createdBy = $createdBy;

View File

@ -32,7 +32,12 @@ class CommentList
*/
protected int $id = 0;
private $comments = [];
/**
*
* @var array
* @since 1.0.0
*/
private array $comments = [];
/**
* Get id.
@ -46,11 +51,27 @@ class CommentList
return $this->id;
}
/**
* Get the comments
*
* @return array
*
* @since 1.0.0
*/
public function getComments() : array
{
return $this->comments;
}
/**
* Add a comment
*
* @param mixed $comment Comment
*
* @return void
*
* @since 1.0.0
*/
public function addComment($comment) : void
{
$this->comments[] = $comment;