phpcs fixes

This commit is contained in:
Dennis Eichhorn 2019-10-06 17:50:12 +02:00
parent 6a961213fa
commit c10ef1ccd8
6 changed files with 290 additions and 28 deletions

View File

@ -24,15 +24,31 @@ namespace Modules\Kanban\Models;
*/ */
class KanbanBoard implements \JsonSerializable class KanbanBoard 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 = BoardStatus::ACTIVE;
private $status = BoardStatus::ACTIVE;
private $order = 0; private $order = 0;
/**
private $description = ''; * Description.
*
* @var string
* @since 1.0.0
*/
private string $description = '';
private $createdBy = 0; private $createdBy = 0;
@ -40,21 +56,49 @@ class KanbanBoard implements \JsonSerializable
private $columns = []; private $columns = [];
/**
* 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;
} }
/**
* 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;
@ -80,26 +124,65 @@ class KanbanBoard implements \JsonSerializable
$this->order = $order; $this->order = $order;
} }
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string public function getDescription() : string
{ {
return $this->description; return $this->description;
} }
/**
* Set description
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescription(string $description) : void public function setDescription(string $description) : void
{ {
$this->description = $description; $this->description = $description;
} }
/**
* Get created by
*
* @return int|\phpOMS\Account\Account
*
* @since 1.0.0
*/
public function getCreatedBy() public function getCreatedBy()
{ {
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;

View File

@ -24,15 +24,31 @@ namespace Modules\Kanban\Models;
*/ */
class KanbanCard implements \JsonSerializable class KanbanCard 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 = CardStatus::ACTIVE;
private $status = CardStatus::ACTIVE; private int $type = CardType::TEXT;
/**
private $type = CardType::TEXT; * Description.
*
private $description = ''; * @var string
* @since 1.0.0
*/
private string $description = '';
private $column = 0; private $column = 0;
@ -50,6 +66,11 @@ class KanbanCard implements \JsonSerializable
private $media = []; private $media = [];
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct() public function __construct()
{ {
$this->createdAt = new \DateTime('now'); $this->createdAt = new \DateTime('now');
@ -65,6 +86,13 @@ class KanbanCard implements \JsonSerializable
$this->order = $order; $this->order = $order;
} }
/**
* Get id.
*
* @return int Model id
*
* @since 1.0.0
*/
public function getId() : int public function getId() : int
{ {
return $this->id; return $this->id;
@ -80,11 +108,27 @@ class KanbanCard implements \JsonSerializable
return $this->column; return $this->column;
} }
/**
* 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;
@ -120,26 +164,65 @@ class KanbanCard implements \JsonSerializable
$this->ref = $ref; $this->ref = $ref;
} }
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string public function getDescription() : string
{ {
return $this->description; return $this->description;
} }
/**
* Set description
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescription(string $description) : void public function setDescription(string $description) : void
{ {
$this->description = $description; $this->description = $description;
} }
/**
* Get created by
*
* @return int|\phpOMS\Account\Account
*
* @since 1.0.0
*/
public function getCreatedBy() public function getCreatedBy()
{ {
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;

View File

@ -24,9 +24,20 @@ namespace Modules\Kanban\Models;
*/ */
class KanbanCardComment implements \JsonSerializable class KanbanCardComment implements \JsonSerializable
{ {
private $id = 0; /**
* ID.
private $description = ''; *
* @var int
* @since 1.0.0
*/
protected int $id = 0;
/**
* Description.
*
* @var string
* @since 1.0.0
*/
private string $description = '';
private $card = 0; private $card = 0;
@ -36,11 +47,23 @@ class KanbanCardComment implements \JsonSerializable
private $media = []; private $media = [];
/**
* 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;
@ -56,26 +79,65 @@ class KanbanCardComment implements \JsonSerializable
return $this->card; return $this->card;
} }
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string public function getDescription() : string
{ {
return $this->description; return $this->description;
} }
/**
* Set description
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescription(string $description) : void public function setDescription(string $description) : void
{ {
$this->description = $description; $this->description = $description;
} }
/**
* 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;

View File

@ -24,9 +24,20 @@ namespace Modules\Kanban\Models;
*/ */
class KanbanColumn implements \JsonSerializable class KanbanColumn 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 $order = 0; private $order = 0;
@ -34,10 +45,13 @@ class KanbanColumn implements \JsonSerializable
private $cards = []; private $cards = [];
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;
@ -63,11 +77,27 @@ class KanbanColumn implements \JsonSerializable
return $this->board; return $this->board;
} }
/**
* 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;

View File

@ -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' => [
'Archive' => 'Archive', 'Archive' => 'Archive',
'Boards' => 'Boards', 'Boards' => 'Boards',

View File

@ -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 ['Kanban' => [ return ['Kanban' => [
'Dashboard' => 'Dashboard', 'Dashboard' => 'Dashboard',
]]; ]];