mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-02-10 07:18:43 +00:00
phpcs fixes
This commit is contained in:
parent
2982e881d4
commit
f888d66c22
|
|
@ -24,26 +24,56 @@ namespace Modules\Knowledgebase\Models;
|
||||||
*/
|
*/
|
||||||
class WikiCategory implements \JsonSerializable
|
class WikiCategory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
private $id = 0;
|
/**
|
||||||
|
* ID.
|
||||||
private $name = '';
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected int $id = 0;
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private string $name = '';
|
||||||
|
|
||||||
private $parent = null;
|
private $parent = null;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getName() : string
|
public function getName() : string
|
||||||
{
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name Name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setName(string $name) : void
|
public function setName(string $name) : void
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,22 @@ namespace Modules\Knowledgebase\Models;
|
||||||
*/
|
*/
|
||||||
class WikiDoc implements \JsonSerializable
|
class WikiDoc implements \JsonSerializable
|
||||||
{
|
{
|
||||||
private $id = 0;
|
/**
|
||||||
|
* ID.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected int $id = 0;
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private string $name = '';
|
||||||
|
|
||||||
private $name = '';
|
private int $status = WikiStatus::ACTIVE;
|
||||||
|
|
||||||
private $status = WikiStatus::ACTIVE;
|
|
||||||
|
|
||||||
private $doc = '';
|
private $doc = '';
|
||||||
|
|
||||||
|
|
@ -42,11 +53,23 @@ class WikiDoc implements \JsonSerializable
|
||||||
|
|
||||||
private $badges = [];
|
private $badges = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->createdAt = new \DateTime('now');
|
$this->createdAt = new \DateTime('now');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id.
|
||||||
|
*
|
||||||
|
* @return int Model id
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getId() : int
|
public function getId() : int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
|
|
@ -62,11 +85,27 @@ class WikiDoc implements \JsonSerializable
|
||||||
$this->language = $language;
|
$this->language = $language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getName() : string
|
public function getName() : string
|
||||||
{
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name Name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setName(string $name) : void
|
public function setName(string $name) : void
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
|
|
@ -102,16 +141,39 @@ class WikiDoc implements \JsonSerializable
|
||||||
$this->category = $category;
|
$this->category = $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get created by
|
||||||
|
*
|
||||||
|
* @return int|\phpOMS\Account\Account
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getCreatedBy() : int
|
public function getCreatedBy() : int
|
||||||
{
|
{
|
||||||
return $this->createdBy;
|
return $this->createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCreatedBy(int $id) : void
|
/**
|
||||||
|
* Set created by
|
||||||
|
*
|
||||||
|
* @param mixed $id Created by
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setCreatedBy($id) : void
|
||||||
{
|
{
|
||||||
$this->createdBy = $id;
|
$this->createdBy = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
|
||||||
|
|
@ -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 ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Wiki' => 'Wiki',
|
'Wiki' => 'Wiki',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -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 ['Knowledgebase' => [
|
return ['Knowledgebase' => [
|
||||||
'Categories' => 'Categories',
|
'Categories' => 'Categories',
|
||||||
'Name' => 'Name',
|
'Name' => 'Name',
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
||||||
$categories = $this->getData('categories');
|
$categories = $this->getData('categories');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user