From 860476360712fc932900a42b7a90dda1d82fd958 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 24 Sep 2023 14:56:44 +0000 Subject: [PATCH] rector fixes --- Admin/Install/Interfaces/DatabaseExchanger/ExchangeTrait.php | 4 +--- Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php | 4 ++-- tests/Bootstrap.php | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Admin/Install/Interfaces/DatabaseExchanger/ExchangeTrait.php b/Admin/Install/Interfaces/DatabaseExchanger/ExchangeTrait.php index 49e4d2f..2e15727 100755 --- a/Admin/Install/Interfaces/DatabaseExchanger/ExchangeTrait.php +++ b/Admin/Install/Interfaces/DatabaseExchanger/ExchangeTrait.php @@ -124,8 +124,6 @@ trait ExchangeTrait $exportQuery->execute(); } - $result = []; - - return $result; + return []; } } diff --git a/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php b/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php index 1b6a953..9663834 100755 --- a/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php +++ b/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php @@ -67,8 +67,8 @@ if (!empty($settingData)) { $importTables = $importSchemaMapper->getTables(); $exportTables = $exportSchemaMapper->getTables(); - $currentImportTableFields = !empty($importTables) ? $importSchemaMapper->getFields($importTables[0]) : []; - $currentExportTableFields = !empty($exportTables) ? $exportSchemaMapper->getFields($exportTables[0]) : []; + $currentImportTableFields = empty($importTables) ? [] : $importSchemaMapper->getFields($importTables[0]); + $currentExportTableFields = empty($exportTables) ? [] : $exportSchemaMapper->getFields($exportTables[0]); } $isNew = $currentSetting->id === 0; 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); });