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