diff --git a/Models/Balance.php b/Models/Balance.php
index 18fcfa8..ace21f7 100644
--- a/Models/Balance.php
+++ b/Models/Balance.php
@@ -46,7 +46,7 @@ class Balance
* @var string
* @since 1.0.0
*/
- private string $name = '';
+ public string $name = '';
/**
* Balance description.
@@ -68,32 +68,6 @@ class Balance
return $this->id;
}
- /**
- * 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
*
diff --git a/Models/CostCenter.php b/Models/CostCenter.php
index f36087d..69ace88 100644
--- a/Models/CostCenter.php
+++ b/Models/CostCenter.php
@@ -38,7 +38,7 @@ class CostCenter
* @var string
* @since 1.0.0
*/
- private string $code = '';
+ public string $code = '';
/**
* Localization.
@@ -46,7 +46,7 @@ class CostCenter
* @var L11nCostCenter
* @since 1.0.0
*/
- private L11nCostCenter $l11n;
+ public L11nCostCenter $l11n;
/**
* Parent.
@@ -54,7 +54,7 @@ class CostCenter
* @var null|int|CostCenter
* @since 1.0.0
*/
- private $parent = null;
+ public $parent = null;
/**
* Constructor.
@@ -77,108 +77,4 @@ class CostCenter
{
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->l11n->setName($name);
- }
-
- /**
- * Get name
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getName() : string
- {
- return $this->l11n->getName();
- }
-
- /**
- * Set description
- *
- * @param string $description Balance description
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setDescription(string $description) : void
- {
- $this->l11n->setDescription($description);
- }
-
- /**
- * Get description
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getDescription() : string
- {
- return $this->l11n->getDescription();
- }
-
- /**
- * Set parent
- *
- * @param null|int|CostCenter $parent Parent
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setParent($parent) : void
- {
- $this->parent = $parent;
- }
-
- /**
- * Get parent
- *
- * @return mixed
- *
- * @since 1.0.0
- */
- public function getParent()
- {
- return $this->parent;
- }
}
diff --git a/Models/CostObject.php b/Models/CostObject.php
index 82a3be9..f04e9fa 100644
--- a/Models/CostObject.php
+++ b/Models/CostObject.php
@@ -38,7 +38,7 @@ class CostObject
* @var string
* @since 1.0.0
*/
- private string $code = '';
+ public string $code = '';
/**
* Localization.
@@ -46,7 +46,7 @@ class CostObject
* @var L11nCostObject
* @since 1.0.0
*/
- private L11nCostObject $l11n;
+ public L11nCostObject $l11n;
/**
* Parent.
@@ -54,7 +54,7 @@ class CostObject
* @var null|int|CostObject
* @since 1.0.0
*/
- private $parent = null;
+ public $parent = null;
/**
* Constructor.
@@ -77,108 +77,4 @@ class CostObject
{
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->l11n->setName($name);
- }
-
- /**
- * Get name
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getName() : string
- {
- return $this->l11n->getName();
- }
-
- /**
- * Set description
- *
- * @param string $description Balance description
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setDescription(string $description) : void
- {
- $this->l11n->setDescription($description);
- }
-
- /**
- * Get description
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getDescription() : string
- {
- return $this->l11n->getDescription();
- }
-
- /**
- * Set parent
- *
- * @param null|int|CostObject $parent Parent
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setParent($parent) : void
- {
- $this->parent = $parent;
- }
-
- /**
- * Get parent
- *
- * @return mixed
- *
- * @since 1.0.0
- */
- public function getParent()
- {
- return $this->parent;
- }
}
diff --git a/Models/L11nCostCenter.php b/Models/L11nCostCenter.php
index 262e76e..a2ca896 100644
--- a/Models/L11nCostCenter.php
+++ b/Models/L11nCostCenter.php
@@ -57,7 +57,7 @@ class L11nCostCenter implements \JsonSerializable, ArrayableInterface
* @var string
* @since 1.0.0
*/
- private string $name = '';
+ public string $name = '';
/**
* Description.
@@ -65,7 +65,7 @@ class L11nCostCenter implements \JsonSerializable, ArrayableInterface
* @var string
* @since 1.0.0
*/
- private string $description = '';
+ public string $description = '';
/**
* Get id
@@ -131,58 +131,6 @@ class L11nCostCenter implements \JsonSerializable, ArrayableInterface
$this->language = $language;
}
- /**
- * Get costcenter name.
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getName() : string
- {
- return $this->name;
- }
-
- /**
- * Set name
- *
- * @param string $name Name
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setName(string $name) : void
- {
- $this->name = $name;
- }
-
- /**
- * Get costcenter description.
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getDescription() : string
- {
- return $this->description;
- }
-
- /**
- * Set description
- *
- * @param string $description Description
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setDescription(string $description) : void
- {
- $this->description = $description;
- }
-
/**
* {@inheritdoc}
*/
diff --git a/Models/L11nCostObject.php b/Models/L11nCostObject.php
index 4fe36be..45e3511 100644
--- a/Models/L11nCostObject.php
+++ b/Models/L11nCostObject.php
@@ -57,7 +57,7 @@ class L11nCostObject implements \JsonSerializable, ArrayableInterface
* @var string
* @since 1.0.0
*/
- private string $name = '';
+ public string $name = '';
/**
* Description.
@@ -65,7 +65,7 @@ class L11nCostObject implements \JsonSerializable, ArrayableInterface
* @var string
* @since 1.0.0
*/
- private string $description = '';
+ public string $description = '';
/**
* Get id
@@ -131,58 +131,6 @@ class L11nCostObject implements \JsonSerializable, ArrayableInterface
$this->language = $language;
}
- /**
- * Get costobject name.
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getName() : string
- {
- return $this->name;
- }
-
- /**
- * Set name
- *
- * @param string $name Name
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setName(string $name) : void
- {
- $this->name = $name;
- }
-
- /**
- * Get costobject description.
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getDescription() : string
- {
- return $this->description;
- }
-
- /**
- * Set description
- *
- * @param string $description Description
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setDescription(string $description) : void
- {
- $this->description = $description;
- }
-
/**
* {@inheritdoc}
*/
diff --git a/Theme/Backend/costcenter-list.tpl.php b/Theme/Backend/costcenter-list.tpl.php
index b1fed3f..2bd6d4f 100644
--- a/Theme/Backend/costcenter-list.tpl.php
+++ b/Theme/Backend/costcenter-list.tpl.php
@@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
| = $this->printHtml($value->getCode()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
| = $this->getHtml('Empty', '0', '0'); ?>
diff --git a/Theme/Backend/costobject-list.tpl.php b/Theme/Backend/costobject-list.tpl.php
index ed2ff70..811e3f3 100644
--- a/Theme/Backend/costobject-list.tpl.php
+++ b/Theme/Backend/costobject-list.tpl.php
@@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
|
| = $this->printHtml($value->getCode()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
| = $this->getHtml('Empty', '0', '0'); ?>
diff --git a/Theme/Backend/gl-list.tpl.php b/Theme/Backend/gl-list.tpl.php
index 41912b3..ae4f79a 100644
--- a/Theme/Backend/gl-list.tpl.php
+++ b/Theme/Backend/gl-list.tpl.php
@@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
| = $this->printHtml($value->getId()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
|
|
diff --git a/Theme/Backend/journal-list.tpl.php b/Theme/Backend/journal-list.tpl.php
index 0e92e39..42c623e 100644
--- a/Theme/Backend/journal-list.tpl.php
+++ b/Theme/Backend/journal-list.tpl.php
@@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
| = $this->printHtml($value->getId()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
|
|
diff --git a/Theme/Backend/stack-archive-list.tpl.php b/Theme/Backend/stack-archive-list.tpl.php
index 30df7e0..4253c39 100644
--- a/Theme/Backend/stack-archive-list.tpl.php
+++ b/Theme/Backend/stack-archive-list.tpl.php
@@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
| = $this->printHtml($value->getId()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
|
|
diff --git a/Theme/Backend/stack-list.tpl.php b/Theme/Backend/stack-list.tpl.php
index 5bb9cb1..9352e81 100644
--- a/Theme/Backend/stack-list.tpl.php
+++ b/Theme/Backend/stack-list.tpl.php
@@ -43,7 +43,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
| = $this->printHtml($value->getId()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
|
|
diff --git a/Theme/Backend/stack-predefined-list.tpl.php b/Theme/Backend/stack-predefined-list.tpl.php
index de583c1..0a72605 100644
--- a/Theme/Backend/stack-predefined-list.tpl.php
+++ b/Theme/Backend/stack-predefined-list.tpl.php
@@ -42,7 +42,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
| = $this->printHtml($value->getId()); ?>
- | = $this->printHtml($value->getName()); ?>
+ | = $this->printHtml($value->name); ?>
|
|
|
diff --git a/tests/Models/CostCenterMapperTest.php b/tests/Models/CostCenterMapperTest.php
index 73e44ea..ea749c1 100644
--- a/tests/Models/CostCenterMapperTest.php
+++ b/tests/Models/CostCenterMapperTest.php
@@ -30,17 +30,17 @@ class CostCenterMapperTest extends \PHPUnit\Framework\TestCase
public function testCR() : void
{
$costcenter = new CostCenter();
- $costcenter->setCode('123');
- $costcenter->setName('Test CostCenter');
- $costcenter->setDescription('Test description');
+ $costcenter->code = '123';
+ $costcenter->l11n->name = 'Test CostCenter';
+ $costcenter->l11n->description = 'Test description';
$id = CostCenterMapper::create($costcenter);
self::assertGreaterThan(0, $costcenter->getId());
self::assertEquals($id, $costcenter->getId());
$costcenterR = CostCenterMapper::withConditional('language', ISO639x1Enum::_EN)::get($costcenter->getId());
- self::assertEquals($costcenter->getCode(), $costcenterR->getCode());
- self::assertEquals($costcenter->getName(), $costcenterR->getName());
- self::assertEquals($costcenter->getDescription(), $costcenterR->getDescription());
+ self::assertEquals($costcenter->code, $costcenterR->code);
+ self::assertEquals($costcenter->l11n->name, $costcenterR->l11n->name);
+ self::assertEquals($costcenter->l11n->description, $costcenterR->l11n->description);
}
}
diff --git a/tests/Models/CostCenterTest.php b/tests/Models/CostCenterTest.php
index b13096f..7532b09 100644
--- a/tests/Models/CostCenterTest.php
+++ b/tests/Models/CostCenterTest.php
@@ -30,10 +30,10 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
$cc = new CostCenter();
self::assertEquals(0, $cc->getId());
- self::assertEquals('', $cc->getName());
- self::assertEquals('', $cc->getCode());
- self::assertEquals('', $cc->getDescription());
- self::assertNull($cc->getParent());
+ self::assertEquals('', $cc->l11n->name);
+ self::assertEquals('', $cc->code);
+ self::assertEquals('', $cc->l11n->description);
+ self::assertNull($cc->parent);
}
/**
@@ -44,8 +44,8 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
{
$cc = new CostCenter();
- $cc->setName('TestName');
- self::assertEquals('TestName', $cc->getName());
+ $cc->l11n->name = 'TestName';
+ self::assertEquals('TestName', $cc->l11n->name);
}
/**
@@ -56,8 +56,8 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
{
$cc = new CostCenter();
- $cc->setCode('TestCode');
- self::assertEquals('TestCode', $cc->getCode());
+ $cc->code = 'TestCode';
+ self::assertEquals('TestCode', $cc->code);
}
/**
@@ -68,8 +68,8 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
{
$cc = new CostCenter();
- $cc->setDescription('TestDescription');
- self::assertEquals('TestDescription', $cc->getDescription());
+ $cc->l11n->description = 'TestDescription';
+ self::assertEquals('TestDescription', $cc->l11n->description);
}
/**
@@ -80,7 +80,7 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
{
$cc = new CostCenter();
- $cc->setParent(1);
- self::assertEquals(1, $cc->getParent());
+ $cc->parent = 1;
+ self::assertEquals(1, $cc->parent);
}
}
diff --git a/tests/Models/CostObjectMapperTest.php b/tests/Models/CostObjectMapperTest.php
index 3b79216..8be06f7 100644
--- a/tests/Models/CostObjectMapperTest.php
+++ b/tests/Models/CostObjectMapperTest.php
@@ -30,17 +30,17 @@ class CostObjectMapperTest extends \PHPUnit\Framework\TestCase
public function testCR() : void
{
$costobject = new CostObject();
- $costobject->setCode('123');
- $costobject->setName('Test CostObject');
- $costobject->setDescription('Test description');
+ $costobject->code = '123';
+ $costobject->l11n->name = 'Test CostObject';
+ $costobject->l11n->description = 'Test description';
$id = CostObjectMapper::create($costobject);
self::assertGreaterThan(0, $costobject->getId());
self::assertEquals($id, $costobject->getId());
$costobjectR = CostObjectMapper::withConditional('language', ISO639x1Enum::_EN)::get($costobject->getId());
- self::assertEquals($costobject->getCode(), $costobjectR->getCode());
- self::assertEquals($costobject->getName(), $costobjectR->getName());
- self::assertEquals($costobject->getDescription(), $costobjectR->getDescription());
+ self::assertEquals($costobject->code, $costobjectR->code);
+ self::assertEquals($costobject->l11n->name, $costobjectR->l11n->name);
+ self::assertEquals($costobject->l11n->description, $costobjectR->l11n->description);
}
}
diff --git a/tests/Models/CostObjectTest.php b/tests/Models/CostObjectTest.php
index 39b2001..4e20ba0 100644
--- a/tests/Models/CostObjectTest.php
+++ b/tests/Models/CostObjectTest.php
@@ -30,10 +30,10 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
$co = new CostObject();
self::assertEquals(0, $co->getId());
- self::assertEquals('', $co->getName());
- self::assertEquals('', $co->getCode());
- self::assertEquals('', $co->getDescription());
- self::assertNull($co->getParent());
+ self::assertEquals('', $co->l11n->name);
+ self::assertEquals('', $co->code);
+ self::assertEquals('', $co->l11n->description);
+ self::assertNull($co->parent);
}
/**
@@ -44,8 +44,8 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
{
$co = new CostObject();
- $co->setName('TestName');
- self::assertEquals('TestName', $co->getName());
+ $co->l11n->name = 'TestName';
+ self::assertEquals('TestName', $co->l11n->name);
}
/**
@@ -56,8 +56,8 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
{
$co = new CostObject();
- $co->setCode('TestCode');
- self::assertEquals('TestCode', $co->getCode());
+ $co->code = 'TestCode';
+ self::assertEquals('TestCode', $co->code);
}
/**
@@ -68,8 +68,8 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
{
$co = new CostObject();
- $co->setDescription('TestDescription');
- self::assertEquals('TestDescription', $co->getDescription());
+ $co->l11n->description = 'TestDescription';
+ self::assertEquals('TestDescription', $co->l11n->description);
}
/**
@@ -80,7 +80,7 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
{
$co = new CostObject();
- $co->setParent(1);
- self::assertEquals(1, $co->getParent());
+ $co->parent = 1;
+ self::assertEquals(1, $co->parent);
}
}
|