@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $contentType = $contentType ?? mime_content_type($fileResponse); |
158 | 158 | $this->addCallbackRoute( |
159 | 159 | $uri, |
160 | - function (Request $request) use ($fileResponse, $contentType): Response { |
|
160 | + function(Request $request) use ($fileResponse, $contentType): Response { |
|
161 | 161 | |
162 | 162 | $response = new Response(file_get_contents($fileResponse)); |
163 | 163 | $response->prepare($request); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | { |
210 | 210 | $this->addCallbackRoute( |
211 | 211 | $uri, |
212 | - function (Request $request) use ($pathToFile): Response { |
|
212 | + function(Request $request) use ($pathToFile): Response { |
|
213 | 213 | $response = new BinaryFileResponse($pathToFile); |
214 | 214 | $response->setContentDisposition( |
215 | 215 | ResponseHeaderBag::DISPOSITION_ATTACHMENT, |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | 'server' => $request->server->all(), |
358 | 358 | 'files' => $request->files->all(), |
359 | 359 | ]; |
360 | - $uri = $request->getRequestUri(); |
|
360 | + $uri = $request->getRequestUri(); |
|
361 | 361 | if (true === $this->verbose) { |
362 | 362 | file_put_contents('php://stderr', "\nRequest: $uri\n".var_export($output, true)); |
363 | 363 | } |
@@ -14,8 +14,8 @@ |
||
14 | 14 | } |
15 | 15 | if (!$autoloadFileFound) { |
16 | 16 | echo 'You need to set up the project dependencies using the following commands:'.PHP_EOL. |
17 | - 'curl -s http://getcomposer.org/installer | php'.PHP_EOL. |
|
18 | - 'php composer.phar install'.PHP_EOL; |
|
17 | + 'curl -s http://getcomposer.org/installer | php'.PHP_EOL. |
|
18 | + 'php composer.phar install'.PHP_EOL; |
|
19 | 19 | die(1); |
20 | 20 | } |
21 | 21 |
@@ -133,14 +133,14 @@ |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | return $noXdebugFunction |
136 | - .'cd '.$this->htdocsPath.';' |
|
137 | - .$nohup |
|
138 | - .'php' |
|
139 | - .$iniPathConfig |
|
140 | - .' -d error_reporting=E_ALL' |
|
141 | - .' -d error_log=\''.$logFilePath.'\'' |
|
142 | - .' -S '.$this->ipAddress.':'.$this->port.' '.$this->routerPath |
|
143 | - .$detatch; |
|
136 | + .'cd '.$this->htdocsPath.';' |
|
137 | + .$nohup |
|
138 | + .'php' |
|
139 | + .$iniPathConfig |
|
140 | + .' -d error_reporting=E_ALL' |
|
141 | + .' -d error_log=\''.$logFilePath.'\'' |
|
142 | + .' -S '.$this->ipAddress.':'.$this->port.' '.$this->routerPath |
|
143 | + .$detatch; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public const IP_LOCALHOST = '0.0.0.0'; |
18 | 18 | public const IP_CALCULATE_NETWORK_IP = 'calculate'; |
19 | 19 | public const IP_CALCULATE_CMD = 'ip route get 8.8.8.8 | ' |
20 | - . 'awk \'{ for (nn=1;nn<=NF;nn++) if ($nn~"src") print $(nn+1) }\' '; |
|
20 | + . 'awk \'{ for (nn=1;nn<=NF;nn++) if ($nn~"src") print $(nn+1) }\' '; |
|
21 | 21 | public const DEFAULT_IP = self::IP_LOCALHOST; |
22 | 22 | |
23 | 23 | public const KEY_PORT = 'MockServer_Port'; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public const DEFAULT_HTDOCS_PATH = '/tests/MockServer/htdocs'; |
31 | 31 | |
32 | 32 | public const KEY_LOGS_PATH = 'MockServer_LogsPath'; |
33 | - public const DEFAULT_LOGS_PATH = __DIR__ . '/../var/logs/'; |
|
33 | + public const DEFAULT_LOGS_PATH = __DIR__.'/../var/logs/'; |
|
34 | 34 | |
35 | 35 | |
36 | 36 | /** |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | ); |
57 | 57 | if (0 !== $exitCode) { |
58 | 58 | throw new MockServerException( |
59 | - 'Failed getting mock server IP, got exit code ' . $exitCode . ' and output: ' |
|
60 | - . "\n" . implode("\n", $output) |
|
59 | + 'Failed getting mock server IP, got exit code '.$exitCode.' and output: ' |
|
60 | + . "\n".implode("\n", $output) |
|
61 | 61 | ); |
62 | 62 | } |
63 | 63 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public static function getRouterPath(): string |
73 | 73 | { |
74 | - return $_SERVER[self::KEY_ROUTER_PATH] ?? self::getPathToProjectRoot() . '/' . self::DEFAULT_ROUTER_PATH; |
|
74 | + return $_SERVER[self::KEY_ROUTER_PATH] ?? self::getPathToProjectRoot().'/'.self::DEFAULT_ROUTER_PATH; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | |
86 | 86 | return \dirname($reflection->getFileName(), 3); |
87 | 87 | } catch (\Exception $e) { |
88 | - throw new MockServerException('Exception in ' . __METHOD__, $e->getCode(), $e); |
|
88 | + throw new MockServerException('Exception in '.__METHOD__, $e->getCode(), $e); |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | 92 | public static function getHtdocsPath(): string |
93 | 93 | { |
94 | - return $_SERVER[self::KEY_HTDOCS_PATH] ?? self::getPathToProjectRoot() . '/' . self::DEFAULT_HTDOCS_PATH; |
|
94 | + return $_SERVER[self::KEY_HTDOCS_PATH] ?? self::getPathToProjectRoot().'/'.self::DEFAULT_HTDOCS_PATH; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | public static function getLogsPath(): string |