mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-02-18 06:58:40 +00:00
fix phpstan/phpcs
This commit is contained in:
parent
3cc6b94a94
commit
2045b9b0bd
|
|
@ -41,10 +41,17 @@ final class Installer extends InstallerAbstract
|
|||
{
|
||||
parent::install($dbPool, $info, $cfgHandler);
|
||||
|
||||
self::createStock();
|
||||
self::createDefaultStock();
|
||||
}
|
||||
|
||||
private static function createStock() : void
|
||||
/**
|
||||
* Creates a default stock
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function createDefaultStock() : void
|
||||
{
|
||||
$stock = new Stock('Default');
|
||||
$stock->type = 0;
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const STOCK = 1;
|
||||
|
||||
public const STOCK_LOCATION = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,15 +32,35 @@ class Stock
|
|||
*/
|
||||
private int $id = 0;
|
||||
|
||||
/**
|
||||
* NAme.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public string $name = '';
|
||||
|
||||
public int $type = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name Stock name
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct(string $name = '')
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
|
|
|
|||
|
|
@ -42,11 +42,25 @@ class StockLocation
|
|||
|
||||
public int $z = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name Stock name
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct(string $name = '')
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@ class StockMovement
|
|||
*/
|
||||
public \DateTimeImmutable $createdAt;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->createdBy = new NullAccount();
|
||||
|
|
|
|||
|
|
@ -42,11 +42,25 @@ class StockShelf
|
|||
|
||||
public int $z = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $name Shelf name
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct(string $name = '')
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user