From c98bc85b7ff2aa2ff0092df7a84da4ca2825fc8d Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Mon, 28 Nov 2022 05:17:30 -0600 Subject: [PATCH] Cleanup --- src/MockWebServer.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/MockWebServer.php b/src/MockWebServer.php index c6673a8..29bd45d 100644 --- a/src/MockWebServer.php +++ b/src/MockWebServer.php @@ -83,7 +83,7 @@ public function start() : void { throw new Exceptions\ServerException("Failed to start server. Is something already running on port {$this->port}?"); } - register_shutdown_function(function () { + register_shutdown_function(function() { if( $this->isRunning() ) { $this->stop(); } @@ -270,18 +270,14 @@ private function findOpenPort() : int { throw new Exceptions\RuntimeException('Failed to find open port'); } - /** - * @return bool - */ - private function isWindowsPlatform() { + private function isWindowsPlatform() : bool { return defined('PHP_WINDOWS_VERSION_MAJOR'); } /** - * @param string $fullCmd * @return resource */ - private function startServer( $fullCmd ) { + private function startServer( string $fullCmd ) { if( !$this->isWindowsPlatform() ) { // We need to prefix exec to get the correct process http://php.net/manual/ru/function.proc-get-status.php#93382 $fullCmd = 'exec ' . $fullCmd;