diff --git a/flight/Engine.php b/flight/Engine.php
index 2d46349..8dbb6dc 100644
--- a/flight/Engine.php
+++ b/flight/Engine.php
@@ -743,9 +743,9 @@ class Engine
->status($code)
->header('Content-Type', 'application/json; charset=' . $charset)
->write($json);
- if($this->response()->v2_output_buffering === true) {
- $this->response()->send();
- }
+ if ($this->response()->v2_output_buffering === true) {
+ $this->response()->send();
+ }
}
/**
diff --git a/tests/server/index.php b/tests/server/index.php
index 236ad31..80efa6a 100644
--- a/tests/server/index.php
+++ b/tests/server/index.php
@@ -23,9 +23,9 @@ Flight::group('', function () {
// Test 1: Root route
Flight::route('/', function () {
echo 'Route text: Root route works!';
- if(Flight::request()->query->redirected) {
- echo '
Redirected from /redirect route successfully!';
- }
+ if (Flight::request()->query->redirected) {
+ echo '
Redirected from /redirect route successfully!';
+ }
});
Flight::route('/querytestpath', function () {
echo 'Route text: This ir query route
';
@@ -99,22 +99,21 @@ Flight::group('', function () {
trigger_error('This is a successful error');
});
- // Test 10: Halt
- Flight::route('/halt', function() {
- Flight::halt(400, 'Halt worked successfully');
- });
-
+ // Test 10: Halt
+ Flight::route('/halt', function () {
+ Flight::halt(400, 'Halt worked successfully');
+ });
}, [ new LayoutMiddleware() ]);
// Test 9: JSON output
-Flight::route('/json', function() {
- Flight::json(['message' => 'JSON renders successfully!']);
+Flight::route('/json', function () {
+ Flight::json(['message' => 'JSON renders successfully!']);
});
// Test 11: Redirect
-Flight::route('/redirect', function() {
- Flight::redirect('/?redirected=1');
+Flight::route('/redirect', function () {
+ Flight::redirect('/?redirected=1');
});
Flight::map('error', function (Throwable $e) {