diff --git a/Admin/Installer.php b/Admin/Installer.php index eacce17..be74341 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -108,9 +108,9 @@ final class Installer extends InstallerAbstract continue; } - $l11nTypes[] = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $l11nTypes[] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); } return $l11nTypes; @@ -155,9 +155,9 @@ final class Installer extends InstallerAbstract continue; } - $supplierAttrType[$attribute['name']] = !\is_array($responseData['response']) - ? $responseData['response']->toArray() - : $responseData['response']; + $supplierAttrType[$attribute['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); $isFirst = true; foreach ($attribute['l11n'] as $language => $l11n) { @@ -226,9 +226,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(); $supplierAttrValue[$attribute['name']][] = $attrValue; diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 5673e2a..daf35bd 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -286,8 +286,6 @@ final class BackendController extends Controller */ public function viewSupplierManagementSupplierAnalysis(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface { - $view = new View($this->app->l11nManager, $request, $response); - - return $view; + return new View($this->app->l11nManager, $request, $response); } } 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); });