From 4db0827fd53ba51d114c6647052b2bac2e5eae02 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 24 Sep 2023 14:56:45 +0000 Subject: [PATCH] rector fixes --- Controller/ApiController.php | 8 ++------ tests/Bootstrap.php | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 41c25a7..7b134e1 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -534,9 +534,7 @@ final class ApiController extends Controller return ''; } - $content = \str_replace('{workflow_id}', (string) $template->id, $content); - - return $content; + return \str_replace('{workflow_id}', (string) $template->id, $content); } /** @@ -703,9 +701,7 @@ final class ApiController extends Controller /** @var \Modules\Workflow\Models\WorkflowControllerInterface $controller */ $controller = new \Modules\Workflow\Controller\WorkflowController($this->app, $template); - $instance = $controller->createInstanceFromRequest($request, $template); - - return $instance; + return $controller->createInstanceFromRequest($request, $template); } /** 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); });