diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 9f0a43c..d8ba49a 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -182,7 +182,7 @@ final class BackendController extends Controller /** @var \Model\Setting[] $settings */ $settings = SettingMapper::getAll()->where('module', $id)->execute(); if (!empty($settings)) { - $view->data['settings'] = !\is_array($settings) ? [$settings] : $settings; + $view->data['settings'] = \is_array($settings) ? $settings : [$settings]; } $navigation = NavElementMapper::getAll()->execute(); 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); }); diff --git a/tests/Models/NavigationTest.php b/tests/Models/NavigationTest.php index e4f30e2..24a7917 100755 --- a/tests/Models/NavigationTest.php +++ b/tests/Models/NavigationTest.php @@ -45,7 +45,7 @@ final class NavigationTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertTrue(\count($this->nav->getNav()) > 0); + self::assertTrue(!empty($this->nav->getNav())); } /**