remove some getter/setter

This commit is contained in:
Dennis Eichhorn 2020-11-24 17:31:20 +01:00
parent 6f4df0c925
commit ec4f5cabeb
25 changed files with 151 additions and 574 deletions

View File

@ -40,7 +40,7 @@ class Category
* @var string
* @since 1.0.0
*/
private $title = '';
public string $title = '';
/**
* Description.
@ -48,7 +48,7 @@ class Category
* @var string
* @since 1.0.0
*/
private string $description = '';
public string $description = '';
/**
* Description.
@ -56,7 +56,7 @@ class Category
* @var string
* @since 1.0.0
*/
private string $descriptionRaw = '';
public string $descriptionRaw = '';
/**
* Parent category.
@ -64,23 +64,23 @@ class Category
* @var null|int|self
* @since 1.0.0
*/
private $parent = null;
public $parent = null;
/**
* Responsible person
*
* @var null|Account
* @var null|int
* @since 1.0.0
*/
private ?Account $responsible = null;
public ?int $responsible = null;
/**
* Responsible person
*
* @var null|Account
* @var null|int
* @since 1.0.0
*/
private ?Account $deputy = null;
public ?int $deputy = null;
/**
* Get id.
@ -93,146 +93,4 @@ class Category
{
return $this->id;
}
/**
* Get parent category.
*
* @return mixed
*
* @since 1.0.0
*/
public function getParent()
{
return $this->parent;
}
/**
* Set parent category.
*
* @param mixed $parent Parent category
*
* @return void
*
* @since 1.0.0
*/
public function setParent($parent) : void
{
$this->parent = $parent;
}
/**
* Get responsible.
*
* @return mixed
*
* @since 1.0.0
*/
public function getResponsible()
{
return $this->responsible;
}
/**
* Set responsible.
*
* @param mixed $responsible Responsible
*
* @return void
*
* @since 1.0.0
*/
public function setResponsible($responsible) : void
{
$this->responsible = $responsible;
}
/**
* Set deputy.
*
* @param mixed $deputy Deputy
*
* @return void
*
* @since 1.0.0
*/
public function setDeputy($deputy) : void
{
$this->deputy = $deputy;
}
/**
* Get deputy.
*
* @return mixed
*
* @since 1.0.0
*/
public function getDeputy()
{
return $this->deputy;
}
/**
* Get title.
*
* @return string
*
* @since 1.0.0
*/
public function getTitle() : string
{
return $this->title;
}
/**
* Set title.
*
* @param string $title Title
*
* @return void
*
* @since 1.0.0
*/
public function setTitle(string $title) : void
{
$this->title = $title;
}
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
/**
* Get raw description.
*
* @return string
*
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
return $this->descriptionRaw;
}
/**
* Set raw description
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) : void
{
$this->descriptionRaw = $description;
}
}

View File

@ -32,7 +32,7 @@ class Cause
*/
protected int $id = 0;
private $title = '';
public string $title = '';
/**
* Description.
@ -40,7 +40,7 @@ class Cause
* @var string
* @since 1.0.0
*/
private string $description = '';
public string $description = '';
/**
* Description.
@ -48,7 +48,7 @@ class Cause
* @var string
* @since 1.0.0
*/
private string $descriptionRaw = '';
public string $descriptionRaw = '';
private $probability = 0;
@ -173,68 +173,4 @@ class Cause
{
$this->department = $department;
}
/**
* Get title.
*
* @return string
*
* @since 1.0.0
*/
public function getTitle() : string
{
return $this->title;
}
/**
* Set title.
*
* @param string $title Title
*
* @return void
*
* @since 1.0.0
*/
public function setTitle(string $title) : void
{
$this->title = $title;
}
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
/**
* Get raw description.
*
* @return string
*
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
return $this->descriptionRaw;
}
/**
* Set raw description.
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) : void
{
$this->descriptionRaw = $description;
}
}

View File

@ -32,7 +32,7 @@ class Process
*/
protected int $id = 0;
private $title = '';
public string $title = '';
/**
* Description.
@ -40,7 +40,7 @@ class Process
* @var string
* @since 1.0.0
*/
private string $description = '';
public string $description = '';
/**
* Description.
@ -48,7 +48,7 @@ class Process
* @var string
* @since 1.0.0
*/
private string $descriptionRaw = '';
public string $descriptionRaw = '';
private $department = null;
@ -70,70 +70,6 @@ class Process
return $this->id;
}
/**
* Get title.
*
* @return string
*
* @since 1.0.0
*/
public function getTitle() : string
{
return $this->title;
}
/**
* Set title.
*
* @param string $title Title
*
* @return void
*
* @since 1.0.0
*/
public function setTitle(string $title) : void
{
$this->title = $title;
}
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
/**
* Get raw description.
*
* @return string
*
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
return $this->descriptionRaw;
}
/**
* Set raw description.
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) : void
{
$this->descriptionRaw = $description;
}
/**
* Get unit.
*

View File

@ -38,7 +38,7 @@ class Risk
* @var string
* @since 1.0.0
*/
private string $name = '';
public string $name = '';
/**
* Description.
@ -46,7 +46,7 @@ class Risk
* @var string
* @since 1.0.0
*/
private string $description = '';
public string $description = '';
/**
* Description.
@ -54,7 +54,7 @@ class Risk
* @var string
* @since 1.0.0
*/
private string $descriptionRaw = '';
public string $descriptionRaw = '';
private $unit = 1;
@ -234,70 +234,6 @@ class Risk
return $this->histScore;
}
/**
* Get 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 description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
/**
* Set raw description.
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) : void
{
$this->descriptionRaw = $description;
}
/**
* Get raw description.
*
* @return string
*
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
return $this->descriptionRaw;
}
/**
* Get unit.
*

View File

@ -32,7 +32,7 @@ class RiskObject
*/
protected int $id = 0;
private $title = '';
public string $title = '';
/**
* Description.
@ -40,7 +40,7 @@ class RiskObject
* @var string
* @since 1.0.0
*/
private string $description = '';
public string $description = '';
/**
* Description.
@ -48,7 +48,7 @@ class RiskObject
* @var string
* @since 1.0.0
*/
private string $descriptionRaw = '';
public string $descriptionRaw = '';
private $risk = null;
@ -89,68 +89,4 @@ class RiskObject
{
$this->risk = $risk;
}
/**
* Get title.
*
* @return string
*
* @since 1.0.0
*/
public function getTitle() : string
{
return $this->title;
}
/**
* Set title.
*
* @param string $title Title
*
* @return void
*
* @since 1.0.0
*/
public function setTitle(string $title) : void
{
$this->title = $title;
}
/**
* Get description
*
* @return string
*
* @since 1.0.0
*/
public function getDescription() : string
{
return $this->description;
}
/**
* Get raw description.
*
* @return string
*
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
return $this->descriptionRaw;
}
/**
* Set raw description.
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) : void
{
$this->descriptionRaw = $description;
}
}

View File

@ -32,7 +32,7 @@ class Solution
*/
protected int $id = 0;
private $title = '';
public string $title = '';
/**
* Description.
@ -40,7 +40,7 @@ class Solution
* @var string
* @since 1.0.0
*/
private string $description = '';
public string $description = '';
/**
* Description.
@ -48,7 +48,7 @@ class Solution
* @var string
* @since 1.0.0
*/
private string $descriptionRaw = '';
public string $descriptionRaw = '';
private $probability = 0;
@ -146,32 +146,6 @@ class Solution
$this->probability = $probability;
}
/**
* Get title.
*
* @return string
*
* @since 1.0.0
*/
public function getTitle() : string
{
return $this->title;
}
/**
* Set title.
*
* @param string $title Title
*
* @return void
*
* @since 1.0.0
*/
public function setTitle(string $title) : void
{
$this->title = $title;
}
/**
* Get description
*

View File

@ -46,7 +46,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td>
<td>
<td>

View File

@ -28,7 +28,7 @@ echo $this->getData('nav')->render(); ?>
</ul>
</div>
<div class="tab-content">
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
<table class="layout wf-100">
<tbody>
<tr><td><?= $this->getHtml('Name'); ?></label><td><?= $this->printHtml($department->getDepartment()->getName()); ?>
<tr><td><?= $this->getHtml('Description'); ?>:<td><?= $this->printHtml($department->getDepartment()->getDescription()); ?>
<tr><td><?= $this->getHtml('Description'); ?>:<td><?= $this->printHtml($department->getDepartment()->description); ?>
<tr><td><?= $this->getHtml('Unit'); ?>:<td><?= $this->printHtml($department->getDepartment()->getUnit()->getName()); ?>
<tr><td><?= $this->getHtml('Risks'); ?>:<td>
<tr><td><?= $this->getHtml('Categories'); ?>:<td>
@ -94,7 +94,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -115,7 +115,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}riskmanagement/cause/single?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getCauses())); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getSolutions())); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getRiskObjects())); ?></a>
@ -128,7 +128,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -156,7 +156,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -184,7 +184,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -212,7 +212,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-6' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-6' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -242,7 +242,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-7' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-7' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">

View File

@ -25,7 +25,7 @@ echo $this->getData('nav')->render(); ?>
</ul>
</div>
<div class="tab-content">
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -99,7 +99,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -154,7 +154,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -195,7 +195,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -240,7 +240,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">

View File

@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}riskmanagement/risk/single?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getCauses())); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getSolutions())); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getRiskObjects())); ?></a>

View File

@ -26,7 +26,7 @@ echo $this->getData('nav')->render(); ?>
</ul>
</div>
<div class="tab-content">
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
<table class="layout wf-100">
<tbody>
<tr><td><?= $this->getHtml('Name'); ?><td><?= $this->printHtml($risk->getName()); ?>
<tr><td><?= $this->getHtml('Description'); ?><td><?= $this->printHtml($risk->getDescription()); ?>
<tr><td><?= $this->getHtml('Description'); ?><td><?= $this->printHtml($risk->description); ?>
<tr><td><?= $this->getHtml('Unit'); ?><td><?= $this->printHtml($risk->getUnit()->getName()); ?>
<tr><td><?= $this->getHtml('Category'); ?><td><?= $this->printHtml($risk->getCategory()->getTitle()); ?>
<tr><td><?= $this->getHtml('Department'); ?><td><?= $this->printHtml($risk->getDepartment()->getDepartment()->getName()); ?>
@ -90,7 +90,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -145,7 +145,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -186,7 +186,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -231,7 +231,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">

View File

@ -31,7 +31,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}riskmanagement/unit/single?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -29,7 +29,7 @@ echo $this->getData('nav')->render(); ?>
</ul>
</div>
<div class="tab-content">
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12 col-md-6">
@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
<table class="layout wf-100">
<tbody>
<tr><td><?= $this->getHtml('Name'); ?></label><td><?= $this->printHtml($unit->getName()); ?>
<tr><td><?= $this->getHtml('Description'); ?>:<td><?= $this->printHtml($unit->getDescription()); ?>
<tr><td><?= $this->getHtml('Description'); ?>:<td><?= $this->printHtml($unit->description); ?>
<tr><td><?= $this->getHtml('Risks'); ?>:<td>
<tr><td><?= $this->getHtml('Departments'); ?>:<td>
<tr><td><?= $this->getHtml('Categories'); ?>:<td>
@ -95,7 +95,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -116,7 +116,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}riskmanagement/cause/single?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getCauses())); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getSolutions())); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml(\count($value->getRiskObjects())); ?></a>
@ -129,7 +129,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -157,7 +157,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -185,7 +185,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -213,7 +213,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-6' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-6' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -241,7 +241,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-7' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-7' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">
@ -271,7 +271,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</div>
</div>
<input type="radio" id="c-tab-8" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-8' ? ' checked' : ''; ?>>
<input type="radio" id="c-tab-8" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-8' ? ' checked' : ''; ?>>
<div class="tab">
<div class="row">
<div class="col-xs-12">

View File

@ -14,6 +14,7 @@ declare(strict_types=1);
namespace Modules\RiskManagement\tests\Models;
use Modules\Admin\Models\NullAccount;
use Modules\RiskManagement\Models\Category;
use Modules\RiskManagement\Models\CategoryMapper;
@ -29,17 +30,17 @@ class CategoryMapperTest extends \PHPUnit\Framework\TestCase
public function testCRUD() : void
{
$obj = new Category();
$obj->setTitle('Name');
$obj->setDescriptionRaw('Description');
$obj->setResponsible(1);
$obj->setDeputy(1);
$obj->title = 'Name';
$obj->descriptionRaw = 'Description';
$obj->responsible = 1;
$obj->deputy = 1;
CategoryMapper::create($obj);
$objR = CategoryMapper::get($obj->getId());
self::assertEquals($obj->getTitle(), $objR->getTitle());
self::assertEquals($obj->getDescriptionRaw(), $objR->getDescriptionRaw());
self::assertEquals($obj->getResponsible(), $objR->getResponsible());
self::assertEquals($obj->getDeputy(), $objR->getDeputy());
self::assertEquals($obj->title, $objR->title);
self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw);
self::assertEquals($obj->responsible, $objR->responsible);
self::assertEquals($obj->deputy, $objR->deputy);
}
}

View File

@ -30,12 +30,12 @@ class CategoryTest extends \PHPUnit\Framework\TestCase
$obj = new Category();
self::assertEquals(0, $obj->getId());
self::assertEquals('', $obj->getTitle());
self::assertEquals('', $obj->getDescription());
self::assertEquals('', $obj->getDescriptionRaw());
self::assertNull($obj->getParent());
self::assertNull($obj->getResponsible());
self::assertNull($obj->getDeputy());
self::assertEquals('', $obj->title);
self::assertEquals('', $obj->description);
self::assertEquals('', $obj->descriptionRaw);
self::assertNull($obj->parent);
self::assertNull($obj->responsible);
self::assertNull($obj->deputy);
}
/**
@ -46,19 +46,19 @@ class CategoryTest extends \PHPUnit\Framework\TestCase
{
$obj = new Category();
$obj->setTitle('Name');
self::assertEquals('Name', $obj->getTitle());
$obj->title = 'Name';
self::assertEquals('Name', $obj->title);
$obj->setDescriptionRaw('Description');
self::assertEquals('Description', $obj->getDescriptionRaw());
$obj->descriptionRaw = 'Description';
self::assertEquals('Description', $obj->descriptionRaw);
$obj->setResponsible(1);
self::assertEquals(1, $obj->getResponsible());
$obj->responsible = 1;
self::assertEquals(1, $obj->responsible);
$obj->setDeputy(1);
self::assertEquals(1, $obj->getDeputy());
$obj->deputy = 1;
self::assertEquals(1, $obj->deputy);
$obj->setParent(1);
self::assertEquals(1, $obj->getParent());
$obj->parent = 1;
self::assertEquals(1, $obj->parent);
}
}

View File

@ -32,8 +32,8 @@ class CauseMapperTest extends \PHPUnit\Framework\TestCase
public function testCRUD() : void
{
$obj = new Cause();
$obj->setTitle('Cause Test');
$obj->setDescriptionRaw('Description');
$obj->title = 'Cause Test';
$obj->descriptionRaw = 'Description';
$obj->setProbability(1);
$department = new Department();
@ -41,21 +41,21 @@ class CauseMapperTest extends \PHPUnit\Framework\TestCase
$obj->setDepartment($department);
$category = new Category();
$category->setTitle('Test Cat');
$category->title = 'Test Cat';
$obj->setCategory($category);
$risk = new Risk();
$risk->setName('Cause Test Risk');
$risk->name = 'Cause Test Risk';
$risk->setUnit(1);
$obj->setRisk($risk);
CauseMapper::create($obj);
$objR = CauseMapper::get($obj->getId());
self::assertEquals($obj->getTitle(), $objR->getTitle());
self::assertEquals($obj->getDescriptionRaw(), $objR->getDescriptionRaw());
self::assertEquals($obj->title, $objR->title);
self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw);
self::assertEquals($obj->getDepartment()->getDepartment(), $objR->getDepartment()->getDepartment()->getId());
self::assertEquals($obj->getCategory()->getTitle(), $objR->getCategory()->getTitle());
self::assertEquals($obj->getRisk()->getName(), $objR->getRisk()->getName());
self::assertEquals($obj->getCategory()->title, $objR->getCategory()->title);
self::assertEquals($obj->getRisk()->name, $objR->getRisk()->name);
}
}

View File

@ -30,9 +30,9 @@ class CauseTest extends \PHPUnit\Framework\TestCase
$obj = new Cause();
self::assertEquals(0, $obj->getId());
self::assertEquals('', $obj->getTitle());
self::assertEquals('', $obj->getDescription());
self::assertEquals('', $obj->getDescriptionRaw());
self::assertEquals('', $obj->title);
self::assertEquals('', $obj->description);
self::assertEquals('', $obj->descriptionRaw);
self::assertEquals(0, $obj->getProbability());
self::assertNull($obj->getDepartment());
self::assertNull($obj->getRisk());
@ -47,11 +47,11 @@ class CauseTest extends \PHPUnit\Framework\TestCase
{
$obj = new Cause();
$obj->setTitle('Name');
self::assertEquals('Name', $obj->getTitle());
$obj->title = 'Name';
self::assertEquals('Name', $obj->title);
$obj->setDescriptionRaw('Description');
self::assertEquals('Description', $obj->getDescriptionRaw());
$obj->descriptionRaw = 'Description';
self::assertEquals('Description', $obj->descriptionRaw);
$obj->setProbability(1);
self::assertEquals(1, $obj->getProbability());

View File

@ -29,8 +29,8 @@ class ProcessMapperTest extends \PHPUnit\Framework\TestCase
public function testCRUD() : void
{
$obj = new Process();
$obj->setTitle('Name');
$obj->setDescriptionRaw('Description');
$obj->title = 'Name';
$obj->descriptionRaw = 'Description';
$obj->setDepartment(2);
$obj->setResponsible(1);
$obj->setDeputy(1);
@ -39,8 +39,8 @@ class ProcessMapperTest extends \PHPUnit\Framework\TestCase
ProcessMapper::create($obj);
$objR = ProcessMapper::get($obj->getId());
self::assertEquals($obj->getTitle(), $objR->getTitle());
self::assertEquals($obj->getDescriptionRaw(), $objR->getDescriptionRaw());
self::assertEquals($obj->title, $objR->title);
self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw);
self::assertEquals($obj->getResponsible(), $objR->getResponsible());
self::assertEquals($obj->getDeputy(), $objR->getDeputy());
self::assertEquals($obj->getDepartment(), $objR->getDepartment()->getId());

View File

@ -30,9 +30,9 @@ class ProcessTest extends \PHPUnit\Framework\TestCase
$obj = new Process();
self::assertEquals(0, $obj->getId());
self::assertEquals('', $obj->getTitle());
self::assertEquals('', $obj->getDescription());
self::assertEquals('', $obj->getDescriptionRaw());
self::assertEquals('', $obj->title);
self::assertEquals('', $obj->description);
self::assertEquals('', $obj->descriptionRaw);
self::assertNull($obj->getDepartment());
self::assertEquals(1, $obj->getUnit());
self::assertNull($obj->getResponsible());
@ -47,11 +47,11 @@ class ProcessTest extends \PHPUnit\Framework\TestCase
{
$obj = new Process();
$obj->setTitle('Name');
self::assertEquals('Name', $obj->getTitle());
$obj->title = 'Name';
self::assertEquals('Name', $obj->title);
$obj->setDescriptionRaw('Description');
self::assertEquals('Description', $obj->getDescriptionRaw());
$obj->descriptionRaw = 'Description';
self::assertEquals('Description', $obj->descriptionRaw);
$obj->setResponsible(1);
self::assertEquals(1, $obj->getResponsible());

View File

@ -38,8 +38,8 @@ class RiskMapperTest extends \PHPUnit\Framework\TestCase
{
$obj = new Risk();
$obj->setName('Risk Test');
$obj->setDescriptionRaw('Description');
$obj->name = 'Risk Test';
$obj->descriptionRaw = 'Description';
$obj->setUnit(1);
$obj->setDepartment(2);
@ -57,33 +57,33 @@ class RiskMapperTest extends \PHPUnit\Framework\TestCase
$obj->setDeputy(1);
$causeObj = new Cause();
$causeObj->setTitle('Risk Test Cause');
$causeObj->title = 'Risk Test Cause';
$obj->addCause($causeObj);
$solutionObj = new Solution();
$solutionObj->setTitle('Risk Test Solution');
$solutionObj->title = 'Risk Test Solution';
$obj->addSolution($solutionObj);
$riskObj = new RiskObject();
$riskObj->setTitle('Risk Test Object');
$riskObj->title = 'Risk Test Object';
$obj->addRiskObject($riskObj);
$obj->addHistory(2);
$media = new Media();
$media->setCreatedBy(new NullAccount(1));
$media->setDescription('desc');
$media->createdBy = new NullAccount(1);
$media->description = 'desc';
$media->setPath('some/path');
$media->setSize(11);
$media->setExtension('png');
$media->setName('Image');
$media->size = 11;
$media->extension = 'png';
$media->name = 'Image';
$obj->addMedia($media);
RiskMapper::create($obj);
$objR = RiskMapper::get($obj->getId());
self::assertEquals($obj->getName(), $objR->getName());
self::assertEquals($obj->getDescriptionRaw(), $objR->getDescriptionRaw());
self::assertEquals($obj->name, $objR->name);
self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw);
self::assertEquals($obj->getUnit(), $objR->getUnit()->getId());
self::assertEquals($obj->getDepartment(), $objR->getDepartment()->getId());
self::assertEquals($obj->getCategory()->getId(), $objR->getCategory()->getId());
@ -93,13 +93,13 @@ class RiskMapperTest extends \PHPUnit\Framework\TestCase
self::assertEquals($obj->getProject()->getProject(), $objR->getProject()->getProject()->getId());
$causes = $objR->getCauses();
self::assertEquals($obj->getCauses()[0]->getTitle(), \end($causes)->getTitle());
self::assertEquals($obj->getCauses()[0]->title, \end($causes)->title);
$solutions = $objR->getSolutions();
self::assertEquals($obj->getSolutions()[0]->getTitle(), \end($solutions)->getTitle());
self::assertEquals($obj->getSolutions()[0]->title, \end($solutions)->title);
$riskObjects = $objR->getRiskObjects();
self::assertEquals($obj->getRiskObjects()[0]->getTitle(), \end($riskObjects)->getTitle());
self::assertEquals($obj->getRiskObjects()[0]->title, \end($riskObjects)->title);
//self::assertEquals($obj->getHistory()[0], $objR->getHistory()[0]);
$media = $objR->getMedia();

View File

@ -29,15 +29,15 @@ class RiskObjectMapperTest extends \PHPUnit\Framework\TestCase
public function testCRUD() : void
{
$obj = new RiskObject();
$obj->setTitle('Name');
$obj->setDescriptionRaw('Description');
$obj->title = 'Name';
$obj->descriptionRaw = 'Description';
$obj->setRisk(1);
RiskObjectMapper::create($obj);
$objR = RiskObjectMapper::get($obj->getId());
self::assertEquals($obj->getTitle(), $objR->getTitle());
self::assertEquals($obj->getDescriptionRaw(), $objR->getDescriptionRaw());
self::assertEquals($obj->title, $objR->title);
self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw);
self::assertEquals($obj->getRisk(), $objR->getRisk());
}
}

View File

@ -30,9 +30,9 @@ class RiskObjectTest extends \PHPUnit\Framework\TestCase
$obj = new RiskObject();
self::assertEquals(0, $obj->getId());
self::assertEquals('', $obj->getTitle());
self::assertEquals('', $obj->getDescription());
self::assertEquals('', $obj->getDescriptionRaw());
self::assertEquals('', $obj->title);
self::assertEquals('', $obj->description);
self::assertEquals('', $obj->descriptionRaw);
self::assertEquals(0, $obj->getRisk());
}
@ -44,11 +44,11 @@ class RiskObjectTest extends \PHPUnit\Framework\TestCase
{
$obj = new RiskObject();
$obj->setTitle('Name');
self::assertEquals('Name', $obj->getTitle());
$obj->title = 'Name';
self::assertEquals('Name', $obj->title);
$obj->setDescriptionRaw('Description');
self::assertEquals('Description', $obj->getDescriptionRaw());
$obj->descriptionRaw = 'Description';
self::assertEquals('Description', $obj->descriptionRaw);
$obj->setRisk(1);
self::assertEquals(1, $obj->getRisk());

View File

@ -33,9 +33,9 @@ class RiskTest extends \PHPUnit\Framework\TestCase
$obj = new Risk();
self::assertEquals(0, $obj->getId());
self::assertEquals('', $obj->getName());
self::assertEquals('', $obj->getDescription());
self::assertEquals('', $obj->getDescriptionRaw());
self::assertEquals('', $obj->name);
self::assertEquals('', $obj->description);
self::assertEquals('', $obj->descriptionRaw);
self::assertEquals(1, $obj->getUnit());
self::assertNull($obj->getDepartment());
self::assertNull($obj->getCategory());
@ -58,11 +58,11 @@ class RiskTest extends \PHPUnit\Framework\TestCase
{
$obj = new Risk();
$obj->setName('Name');
self::assertEquals('Name', $obj->getName());
$obj->name = 'Name';
self::assertEquals('Name', $obj->name);
$obj->setDescriptionRaw('Description');
self::assertEquals('Description', $obj->getDescriptionRaw());
$obj->descriptionRaw = 'Description';
self::assertEquals('Description', $obj->descriptionRaw);
$obj->setUnit(1);
self::assertEquals(1, $obj->getUnit());

View File

@ -30,8 +30,8 @@ class SolutionMapperTest extends \PHPUnit\Framework\TestCase
{
$obj = new Solution();
$obj->setTitle('Title');
$obj->setDescriptionRaw('Description');
$obj->title = 'Title';
$obj->descriptionRaw = 'Description';
$obj->setProbability(1);
$obj->setCause(1);
$obj->setRisk(1);
@ -39,8 +39,8 @@ class SolutionMapperTest extends \PHPUnit\Framework\TestCase
SolutionMapper::create($obj);
$objR = SolutionMapper::get($obj->getId());
self::assertEquals($obj->getTitle(), $objR->getTitle());
self::assertEquals($obj->getDescriptionRaw(), $objR->getDescriptionRaw());
self::assertEquals($obj->title, $objR->title);
self::assertEquals($obj->descriptionRaw, $objR->descriptionRaw);
self::assertEquals($obj->getProbability(), $objR->getProbability());
self::assertEquals($obj->getRisk(), $objR->getRisk()->getId());
self::assertEquals($obj->getCause(), $objR->getCause()->getId());

View File

@ -30,9 +30,9 @@ class SolutionTest extends \PHPUnit\Framework\TestCase
$obj = new Solution();
self::assertEquals(0, $obj->getId());
self::assertEquals('', $obj->getTitle());
self::assertEquals('', $obj->getDescription());
self::assertEquals('', $obj->getDescriptionRaw());
self::assertEquals('', $obj->title);
self::assertEquals('', $obj->description);
self::assertEquals('', $obj->descriptionRaw);
self::assertEquals(0, $obj->getProbability());
self::assertEquals(0, $obj->getCause());
self::assertEquals(0, $obj->getRisk());
@ -46,11 +46,11 @@ class SolutionTest extends \PHPUnit\Framework\TestCase
{
$obj = new Solution();
$obj->setTitle('Title');
self::assertEquals('Title', $obj->getTitle());
$obj->title = 'Title';
self::assertEquals('Title', $obj->title);
$obj->setDescriptionRaw('Description');
self::assertEquals('Description', $obj->getDescriptionRaw());
$obj->descriptionRaw = 'Description';
self::assertEquals('Description', $obj->descriptionRaw);
$obj->setProbability(1);
self::assertEquals(1, $obj->getProbability());