rector fixes

This commit is contained in:
Dennis Eichhorn 2023-09-24 14:56:44 +00:00
parent 9bddb7ec31
commit caf55d9c81
3 changed files with 12 additions and 14 deletions

View File

@ -110,9 +110,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;
@ -157,9 +157,9 @@ final class Installer extends InstallerAbstract
continue; continue;
} }
$clientAttrType[$attribute['name']] = !\is_array($responseData['response']) $clientAttrType[$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) {
@ -228,9 +228,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();
$clientAttrValue[$attribute['name']][] = $attrValue; $clientAttrValue[$attribute['name']][] = $attrValue;

View File

@ -301,9 +301,7 @@ final class BackendController extends Controller
*/ */
public function viewClientManagementClientAnalysis(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface public function viewClientManagementClientAnalysis(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); return new View($this->app->l11nManager, $request, $response);
return $view;
} }
/** /**

View File

@ -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);
}); });