mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-15 11:48:40 +00:00
rector fixes
This commit is contained in:
parent
fda49c9622
commit
84042a67eb
|
|
@ -143,9 +143,9 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
$itemId = $responseData['response']->id;
|
$itemId = $responseData['response']->id;
|
||||||
|
|
||||||
$itemArray[] = !\is_array($responseData['response'])
|
$itemArray[] = \is_array($responseData['response'])
|
||||||
? $responseData['response']->toArray()
|
? $responseData['response']
|
||||||
: $responseData['response'];
|
: $responseData['response']->toArray();
|
||||||
|
|
||||||
foreach ($item['l11ns'] as $name => $l11ns) {
|
foreach ($item['l11ns'] as $name => $l11ns) {
|
||||||
$l11nType = $l11nTypes[$name];
|
$l11nType = $l11nTypes[$name];
|
||||||
|
|
@ -244,9 +244,9 @@ final class Installer extends InstallerAbstract
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$l11nTypes[] = !\is_array($responseData['response'])
|
$l11nTypes[] = \is_array($responseData['response'])
|
||||||
? $responseData['response']->toArray()
|
? $responseData['response']
|
||||||
: $responseData['response'];
|
: $responseData['response']->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $l11nTypes;
|
return $l11nTypes;
|
||||||
|
|
@ -284,9 +284,9 @@ final class Installer extends InstallerAbstract
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$relations[] = !\is_array($responseData['response'])
|
$relations[] = \is_array($responseData['response'])
|
||||||
? $responseData['response']->toArray()
|
? $responseData['response']
|
||||||
: $responseData['response'];
|
: $responseData['response']->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $relations;
|
return $relations;
|
||||||
|
|
@ -331,9 +331,9 @@ final class Installer extends InstallerAbstract
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$itemAttrType[$attribute['name']] = !\is_array($responseData['response'])
|
$itemAttrType[$attribute['name']] = \is_array($responseData['response'])
|
||||||
? $responseData['response']->toArray()
|
? $responseData['response']
|
||||||
: $responseData['response'];
|
: $responseData['response']->toArray();
|
||||||
|
|
||||||
$isFirst = true;
|
$isFirst = true;
|
||||||
foreach ($attribute['l11n'] as $language => $l11n) {
|
foreach ($attribute['l11n'] as $language => $l11n) {
|
||||||
|
|
@ -402,9 +402,9 @@ final class Installer extends InstallerAbstract
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$attrValue = !\is_array($responseData['response'])
|
$attrValue = \is_array($responseData['response'])
|
||||||
? $responseData['response']->toArray()
|
? $responseData['response']
|
||||||
: $responseData['response'];
|
: $responseData['response']->toArray();
|
||||||
|
|
||||||
$itemAttrValue[$attribute['name']][] = $attrValue;
|
$itemAttrValue[$attribute['name']][] = $attrValue;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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