From 9843b930d9b1b3d4258a681eaaaf47f734e8c507 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 24 Sep 2023 14:56:44 +0000 Subject: [PATCH] rector fixes --- Admin/Installer.php | 24 ++++++++++++------------ tests/Bootstrap.php | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 9c66cf0..8330d4a 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -114,9 +114,9 @@ final class Installer extends InstallerAbstract continue; } - $equipmentTypes[$type['name']] = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $equipmentTypes[$type['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); $isFirst = true; foreach ($type['l11n'] as $language => $l11n) { @@ -175,9 +175,9 @@ final class Installer extends InstallerAbstract continue; } - $inspectionTypes[$type['name']] = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $inspectionTypes[$type['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); $isFirst = true; foreach ($type['l11n'] as $language => $l11n) { @@ -240,9 +240,9 @@ final class Installer extends InstallerAbstract continue; } - $itemAttrType[$attribute['name']] = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $itemAttrType[$attribute['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); $isFirst = true; foreach ($attribute['l11n'] as $language => $l11n) { @@ -311,9 +311,9 @@ final class Installer extends InstallerAbstract continue; } - $attrValue = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $attrValue = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); $itemAttrValue[$attribute['name']][] = $attrValue; diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index b904f0c..44438e2 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -381,7 +381,7 @@ function phpServe() : void // Execute the command and store the process ID $output = []; - echo \sprintf('Starting server...') . \PHP_EOL; + echo 'Starting server...' . \PHP_EOL; echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL; echo \sprintf(' %s', $command); \exec($command, $output); @@ -406,7 +406,7 @@ function phpServe() : void // Kill the web server when the process ends \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; \exec($killCommand . $pid); });