autoformatting

This commit is contained in:
Dennis Eichhorn 2020-02-20 18:40:02 +01:00
parent 05a1437bca
commit 6e4981a02e
8 changed files with 23 additions and 23 deletions

View File

@ -328,7 +328,7 @@ $GLOBALS['dbpool']->create('schema', $CONFIG['db']['core']['masters']['schema'])
DataMapperAbstract::setConnection($GLOBALS['dbpool']->get()); DataMapperAbstract::setConnection($GLOBALS['dbpool']->get());
function phpServe() function phpServe(): void
{ {
// OS detection // OS detection
$isWindows = \stristr(\php_uname('s'), 'Windows') !== false; $isWindows = \stristr(\php_uname('s'), 'Windows') !== false;
@ -356,8 +356,8 @@ function phpServe()
// Execute the command and store the process ID // Execute the command and store the process ID
$output = []; $output = [];
echo \sprintf('Starting server...') . PHP_EOL; echo \sprintf('Starting server...') . \PHP_EOL;
echo \sprintf(' Current directory: %s', \getcwd()) . PHP_EOL; echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
echo \sprintf(' %s', $command); echo \sprintf(' %s', $command);
\exec($command, $output); \exec($command, $output);
@ -373,16 +373,16 @@ function phpServe()
// Log // Log
echo \sprintf( echo \sprintf(
' %s - Web server started on %s:%d with PID %d', ' %s - Web server started on %s:%d with PID %d',
date('r'), \date('r'),
WEB_SERVER_HOST, WEB_SERVER_HOST,
WEB_SERVER_PORT, WEB_SERVER_PORT,
$pid $pid
) . PHP_EOL; ) . \PHP_EOL;
// Kill the web server when the process ends // Kill the web server when the process ends
\register_shutdown_function(function() use ($killCommand, $pid) { \register_shutdown_function(function() use ($killCommand, $pid): void {
echo PHP_EOL . \sprintf('Stopping server...') . PHP_EOL; echo \PHP_EOL . \sprintf('Stopping server...') . \PHP_EOL;
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . PHP_EOL; echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
\exec($killCommand . $pid); \exec($killCommand . $pid);
}); });
} }

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
require_once __DIR__ . '/../../../Autoloader.php'; require_once __DIR__ . '/../../../Autoloader.php';

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
require_once __DIR__ . '/../../../Autoloader.php'; require_once __DIR__ . '/../../../Autoloader.php';

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
require_once __DIR__ . '/../../../Autoloader.php'; require_once __DIR__ . '/../../../Autoloader.php';

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
require_once __DIR__ . '/../../../Autoloader.php'; require_once __DIR__ . '/../../../Autoloader.php';

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
require_once __DIR__ . '/../../../Autoloader.php'; require_once __DIR__ . '/../../../Autoloader.php';

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
require_once __DIR__ . '/../../../Autoloader.php'; require_once __DIR__ . '/../../../Autoloader.php';

View File

@ -19,10 +19,10 @@ use phpOMS\Message\Http\BrowserType;
use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\Http\HttpRequest;
use phpOMS\Message\Http\OSType; use phpOMS\Message\Http\OSType;
use phpOMS\Message\Http\RequestMethod; use phpOMS\Message\Http\RequestMethod;
use phpOMS\Router\RouteVerb;
use phpOMS\Uri\HttpUri;
use phpOMS\Message\Http\Rest; use phpOMS\Message\Http\Rest;
use phpOMS\Router\RouteVerb;
use phpOMS\System\MimeType; use phpOMS\System\MimeType;
use phpOMS\Uri\HttpUri;
/** /**
* @testdox phpOMS\tests\Message\Http\RequestTest: HttpRequest wrapper for http requests * @testdox phpOMS\tests\Message\Http\RequestTest: HttpRequest wrapper for http requests