Automated formatting changes

This commit is contained in:
Formatter Bot 2021-04-04 15:15:45 +00:00
parent 5bec4e1e7b
commit c10e5fb6f8
7 changed files with 35 additions and 35 deletions

View File

@ -16,13 +16,13 @@ namespace Modules\HumanResourceManagement\Controller;
use Modules\Admin\Models\Account;
use Modules\HumanResourceManagement\Models\Employee;
use Modules\HumanResourceManagement\Models\EmployeeHistory;
use Modules\HumanResourceManagement\Models\EmployeeHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeEducationHistory;
use Modules\HumanResourceManagement\Models\EmployeeEducationHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeHistory;
use Modules\HumanResourceManagement\Models\EmployeeHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeMapper;
use Modules\HumanResourceManagement\Models\EmployeeWorkHistory;
use Modules\HumanResourceManagement\Models\EmployeeWorkHistoryMapper;
use Modules\HumanResourceManagement\Models\EmployeeMapper;
use Modules\Profile\Models\Profile;
use Modules\Profile\Models\ProfileMapper;
use phpOMS\Message\Http\RequestStatusCode;
@ -344,12 +344,12 @@ final class ApiController extends Controller
{
$history = new EmployeeWorkHistory((int) ($request->getData('employee') ?? 0));
$history->setStart(new \DateTime($request->getData('start') ?? 'now'));
$history->jobTitle = $request->getData('title');
$history->address->name = $request->getData('name');
$history->jobTitle = $request->getData('title');
$history->address->name = $request->getData('name');
$history->address->address = $request->getData('address') ?? '';
$history->address->postal = $request->getData('postal') ?? '';
$history->address->city = $request->getData('city') ?? '';
$history->address->state = $request->getData('state') ?? '';
$history->address->postal = $request->getData('postal') ?? '';
$history->address->city = $request->getData('city') ?? '';
$history->address->state = $request->getData('state') ?? '';
$history->address->setCountry($request->getData('country') ?? '');
$history->address->setType(AddressType::WORK);
@ -423,14 +423,14 @@ final class ApiController extends Controller
{
$history = new EmployeeEducationHistory((int) ($request->getData('employee') ?? 0));
$history->setStart(new \DateTime($request->getData('start') ?? 'now'));
$history->educationTitle = $request->getData('title');
$history->score = $request->getData('score') ?? '';
$history->passed = (bool) ($request->getData('passed') ?? true);
$history->address->name = $request->getData('name');
$history->educationTitle = $request->getData('title');
$history->score = $request->getData('score') ?? '';
$history->passed = (bool) ($request->getData('passed') ?? true);
$history->address->name = $request->getData('name');
$history->address->address = $request->getData('address') ?? '';
$history->address->postal = $request->getData('postal') ?? '';
$history->address->city = $request->getData('city') ?? '';
$history->address->state = $request->getData('state') ?? '';
$history->address->postal = $request->getData('postal') ?? '';
$history->address->city = $request->getData('city') ?? '';
$history->address->state = $request->getData('state') ?? '';
$history->address->setCountry($request->getData('country') ?? '');
$history->address->setType(AddressType::EDUCATION);

View File

@ -14,9 +14,9 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\Contract\ArrayableInterface;
use Modules\Admin\Models\Address;
use Modules\Media\Models\Media;
use phpOMS\Contract\ArrayableInterface;
/**
* Employee class.
@ -87,7 +87,7 @@ class EmployeeEducationHistory implements \JsonSerializable, ArrayableInterface
{
$this->employee = $employee;
$this->start = new \DateTime('now');
$this->address = new Address();
$this->address = new Address();
}
/**

View File

@ -14,8 +14,8 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* EmployeHistory mapper class.
@ -34,14 +34,14 @@ final class EmployeeEducationHistoryMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static array $columns = [
'hr_staff_education_history_id' => ['name' => 'hr_staff_education_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_education_history_staff' => ['name' => 'hr_staff_education_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_education_history_id' => ['name' => 'hr_staff_education_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_education_history_staff' => ['name' => 'hr_staff_education_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_education_history_address' => ['name' => 'hr_staff_education_history_address', 'type' => 'Serializable', 'internal' => 'address'],
'hr_staff_education_history_title' => ['name' => 'hr_staff_education_history_title', 'type' => 'string', 'internal' => 'educationTitle'],
'hr_staff_education_history_passed' => ['name' => 'hr_staff_education_history_passed', 'type' => 'bool', 'internal' => 'passed'],
'hr_staff_education_history_score' => ['name' => 'hr_staff_education_history_score', 'type' => 'string', 'internal' => 'score'],
'hr_staff_education_history_start' => ['name' => 'hr_staff_education_history_start', 'type' => 'DateTime', 'internal' => 'start'],
'hr_staff_education_history_end' => ['name' => 'hr_staff_education_history_end', 'type' => 'DateTime', 'internal' => 'end'],
'hr_staff_education_history_title' => ['name' => 'hr_staff_education_history_title', 'type' => 'string', 'internal' => 'educationTitle'],
'hr_staff_education_history_passed' => ['name' => 'hr_staff_education_history_passed', 'type' => 'bool', 'internal' => 'passed'],
'hr_staff_education_history_score' => ['name' => 'hr_staff_education_history_score', 'type' => 'string', 'internal' => 'score'],
'hr_staff_education_history_start' => ['name' => 'hr_staff_education_history_start', 'type' => 'DateTime', 'internal' => 'start'],
'hr_staff_education_history_end' => ['name' => 'hr_staff_education_history_end', 'type' => 'DateTime', 'internal' => 'end'],
];
/**

View File

@ -14,6 +14,7 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use Modules\Media\Models\Media;
use Modules\Organization\Models\Department;
use Modules\Organization\Models\NullDepartment;
use Modules\Organization\Models\NullPosition;
@ -21,7 +22,6 @@ use Modules\Organization\Models\NullUnit;
use Modules\Organization\Models\Position;
use Modules\Organization\Models\Unit;
use phpOMS\Contract\ArrayableInterface;
use Modules\Media\Models\Media;
/**
* Employee class.

View File

@ -14,11 +14,11 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use Modules\Media\Models\MediaMapper;
use Modules\Organization\Models\DepartmentMapper;
use Modules\Organization\Models\PositionMapper;
use Modules\Organization\Models\UnitMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper;
/**
* EmployeHistory mapper class.

View File

@ -14,9 +14,9 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\Contract\ArrayableInterface;
use Modules\Admin\Models\Address;
use Modules\Media\Models\Media;
use phpOMS\Contract\ArrayableInterface;
/**
* Employee class.
@ -83,7 +83,7 @@ class EmployeeWorkHistory implements \JsonSerializable, ArrayableInterface
{
$this->employee = $employee;
$this->start = new \DateTime('now');
$this->address = new Address();
$this->address = new Address();
}
/**

View File

@ -14,8 +14,8 @@ declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* EmployeHistory mapper class.
@ -34,12 +34,12 @@ final class EmployeeWorkHistoryMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static array $columns = [
'hr_staff_work_history_id' => ['name' => 'hr_staff_work_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_work_history_staff' => ['name' => 'hr_staff_work_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_work_history_id' => ['name' => 'hr_staff_work_history_id', 'type' => 'int', 'internal' => 'id'],
'hr_staff_work_history_staff' => ['name' => 'hr_staff_work_history_staff', 'type' => 'int', 'internal' => 'employee'],
'hr_staff_work_history_address' => ['name' => 'hr_staff_work_history_address', 'type' => 'Serializable', 'internal' => 'address'],
'hr_staff_work_history_title' => ['name' => 'hr_staff_work_history_title', 'type' => 'string', 'internal' => 'jobTitle'],
'hr_staff_work_history_start' => ['name' => 'hr_staff_work_history_start', 'type' => 'DateTime', 'internal' => 'start'],
'hr_staff_work_history_end' => ['name' => 'hr_staff_work_history_end', 'type' => 'DateTime', 'internal' => 'end'],
'hr_staff_work_history_title' => ['name' => 'hr_staff_work_history_title', 'type' => 'string', 'internal' => 'jobTitle'],
'hr_staff_work_history_start' => ['name' => 'hr_staff_work_history_start', 'type' => 'DateTime', 'internal' => 'start'],
'hr_staff_work_history_end' => ['name' => 'hr_staff_work_history_end', 'type' => 'DateTime', 'internal' => 'end'],
];
/**