mirror of
https://github.com/Karaka-Management/oms-Comments.git
synced 2026-01-29 16:58:42 +00:00
phpcs fixes
This commit is contained in:
parent
1176c87de3
commit
8b700d9e30
|
|
@ -91,6 +91,15 @@ final class BackendController extends Controller
|
|||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate comment create request
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
*
|
||||
* @return array<string, bool> Returns the validation array of the request
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function validateCommentCreate(RequestAbstract $request) : array
|
||||
{
|
||||
$val = [];
|
||||
|
|
|
|||
|
|
@ -24,7 +24,13 @@ namespace Modules\Comments\Models;
|
|||
*/
|
||||
class Comment
|
||||
{
|
||||
private $id = 0;
|
||||
/**
|
||||
* ID.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected int $id = 0;
|
||||
|
||||
private $createdBy = 0;
|
||||
|
||||
|
|
@ -34,7 +40,7 @@ class Comment
|
|||
|
||||
private $title = '';
|
||||
|
||||
private $status = 0;
|
||||
private int $status = 0;
|
||||
|
||||
private $content = '';
|
||||
|
||||
|
|
@ -42,11 +48,23 @@ class Comment
|
|||
|
||||
private $ref = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->createdAt = new \DateTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int Model id
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
|
|
@ -102,6 +120,13 @@ class Comment
|
|||
$this->contentRaw = $contentRaw;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created by
|
||||
*
|
||||
* @return int|\phpOMS\Account\Account
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getCreatedBy()
|
||||
{
|
||||
return $this->createdBy;
|
||||
|
|
@ -112,6 +137,13 @@ class Comment
|
|||
$this->createdBy = $createdBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created at date time
|
||||
*
|
||||
* @return \DateTime
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getCreatedAt() : \DateTime
|
||||
{
|
||||
return $this->createdAt;
|
||||
|
|
|
|||
|
|
@ -24,14 +24,23 @@ namespace Modules\Comments\Models;
|
|||
*/
|
||||
class CommentList
|
||||
{
|
||||
private $id = 0;
|
||||
/**
|
||||
* ID.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected int $id = 0;
|
||||
|
||||
private $comments = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int Model id
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
|
|
@ -10,5 +10,7 @@
|
|||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
return ['Comments' => [
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
return ['Comments' => [
|
||||
'Created' => 'Created',
|
||||
'Creator' => 'Creator',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user