mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-02-16 04:38:42 +00:00
rector fixes
This commit is contained in:
parent
69bea5b8ec
commit
8d2b015624
|
|
@ -202,9 +202,7 @@ final class ApiController extends Controller
|
||||||
$profile = new Profile($account);
|
$profile = new Profile($account);
|
||||||
$profile->birthday = new \DateTime($request->getDataString('birthday') ?? 'now');
|
$profile->birthday = new \DateTime($request->getDataString('birthday') ?? 'now');
|
||||||
|
|
||||||
$employee = new Employee($profile);
|
return new Employee($profile);
|
||||||
|
|
||||||
return $employee;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ class EmployeeEducationHistory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'employee' => !\is_int($this->employee) ? $this->employee->id : $this->employee,
|
'employee' => \is_int($this->employee) ? $this->employee : $this->employee->id,
|
||||||
'educationTitle' => $this->educationTitle,
|
'educationTitle' => $this->educationTitle,
|
||||||
'passed' => $this->passed,
|
'passed' => $this->passed,
|
||||||
'score' => $this->score,
|
'score' => $this->score,
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ class EmployeeHistory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'employee' => !\is_int($this->employee) ? $this->employee->id : $this->employee,
|
'employee' => \is_int($this->employee) ? $this->employee : $this->employee->id,
|
||||||
'unit' => $this->unit,
|
'unit' => $this->unit,
|
||||||
'department' => $this->department,
|
'department' => $this->department,
|
||||||
'position' => $this->position,
|
'position' => $this->position,
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ class EmployeeWorkHistory implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'employee' => !\is_int($this->employee) ? $this->employee->id : $this->employee,
|
'employee' => \is_int($this->employee) ? $this->employee : $this->employee->id,
|
||||||
'jobTitle' => $this->jobTitle,
|
'jobTitle' => $this->jobTitle,
|
||||||
'start' => $this->start,
|
'start' => $this->start,
|
||||||
'end' => $this->end,
|
'end' => $this->end,
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ function phpServe() : void
|
||||||
|
|
||||||
// Execute the command and store the process ID
|
// Execute the command and store the process ID
|
||||||
$output = [];
|
$output = [];
|
||||||
echo \sprintf('Starting server...') . \PHP_EOL;
|
echo 'Starting server...' . \PHP_EOL;
|
||||||
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
|
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
|
||||||
echo \sprintf(' %s', $command);
|
echo \sprintf(' %s', $command);
|
||||||
\exec($command, $output);
|
\exec($command, $output);
|
||||||
|
|
@ -406,7 +406,7 @@ function phpServe() : void
|
||||||
|
|
||||||
// Kill the web server when the process ends
|
// Kill the web server when the process ends
|
||||||
\register_shutdown_function(function() use ($killCommand, $pid) : void {
|
\register_shutdown_function(function() use ($killCommand, $pid) : void {
|
||||||
echo \PHP_EOL . \sprintf('Stopping server...') . \PHP_EOL;
|
echo \PHP_EOL . 'Stopping server...' . \PHP_EOL;
|
||||||
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
|
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
|
||||||
\exec($killCommand . $pid);
|
\exec($killCommand . $pid);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user