cleanup tests and use @covers more

This commit is contained in:
Dennis Eichhorn 2019-11-10 22:40:27 +01:00
parent 42e564c10c
commit 2d304ea5a9
4 changed files with 5 additions and 309 deletions

View File

@ -60,7 +60,7 @@ class BatchPosting implements \Countable
/**
* Postings.
*
* @var PostingAbstract[]
* @var PostingInterface[]
* @since 1.0.0
*/
private $postings = [];
@ -156,11 +156,11 @@ class BatchPosting implements \Countable
*
* @param int $id Posting ID
*
* @return null|PostingAbstract
* @return null|PostingInterface
*
* @since 1.0.0
*/
public function getPosting(int $id) : ?PostingAbstract
public function getPosting(int $id) : ?PostingInterface
{
return $this->postings[$id] ?? null;
}
@ -188,13 +188,13 @@ class BatchPosting implements \Countable
/**
* Add posting.
*
* @param PostingAbstract $posting Posting
* @param PostingInterface $posting Posting
*
* @return void
*
* @since 1.0.0
*/
public function addPosting(PostingAbstract $posting) : void
public function addPosting(PostingInterface $posting) : void
{
$this->postings[] = $posting;
}

View File

@ -1,148 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Accounting\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Accounting\Models;
/**
* BatchPosting class.
*
* @package Modules\Accounting\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class CostCenter
{
/**
* ID.
*
* @var int
* @since 1.0.0
*/
private int $id = 0;
/**
* Code.
*
* @var string
* @since 1.0.0
*/
private string $code = '';
/**
* Name.
*
* @var string
* @since 1.0.0
*/
private string $name = '';
/**
* Description.
*
* @var string
* @since 1.0.0
*/
private string $description = '';
/**
* Get balance id
*
* @return int
*
* @since 1.0.0
*/
public function getId() : int
{
return $this->id;
}
/**
* Set code
*
* @param string $code Balance code
*
* @return void
*
* @since 1.0.0
*/
public function setCode(string $code) : void
{
$this->code = $code;
}
/**
* Get code
*
* @return string
*
* @since 1.0.0
*/
public function getCode() : string
{
return $this->code;
}
/**
* Set name
*
* @param string $name Balance name
*
* @return void
*
* @since 1.0.0
*/
public function setName(string $name) : void
{
$this->name = $name;
}
/**
* Get name
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* Set description
*
* @param string $description Balance description
*
* @return void
*
* @since 1.0.0
*/
public function setDescription(string $description) : void
{
$this->description = $description;
}
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
}

View File

@ -1,148 +0,0 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Accounting\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Accounting\Models;
/**
* BatchPosting class.
*
* @package Modules\Accounting\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class CostObject
{
/**
* ID.
*
* @var int
* @since 1.0.0
*/
private int $id = 0;
/**
* Code.
*
* @var string
* @since 1.0.0
*/
private string $code = '';
/**
* Name.
*
* @var string
* @since 1.0.0
*/
private string $name = '';
/**
* Description.
*
* @var string
* @since 1.0.0
*/
private string $description = '';
/**
* Get balance id
*
* @return int
*
* @since 1.0.0
*/
public function getId() : int
{
return $this->id;
}
/**
* Set code
*
* @param string $code Balance code
*
* @return void
*
* @since 1.0.0
*/
public function setCode(string $code) : void
{
$this->code = $code;
}
/**
* Get code
*
* @return string
*
* @since 1.0.0
*/
public function getCode() : string
{
return $this->code;
}
/**
* Set name
*
* @param string $name Balance name
*
* @return void
*
* @since 1.0.0
*/
public function setName(string $name) : void
{
$this->name = $name;
}
/**
* Get name
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* Set description
*
* @param string $description Balance description
*
* @return void
*
* @since 1.0.0
*/
public function setDescription(string $description) : void
{
$this->description = $description;
}
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
}

View File

@ -25,12 +25,4 @@ namespace Modules\Accounting\Models;
abstract class PostingAbstract implements PostingInterface
{
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct()
{
}
}