summaryrefslogtreecommitdiff
path: root/tests/http
diff options
context:
space:
mode:
authorThomas PEREZ <[email protected]>2019-10-09 20:57:28 +0200
committerThomas PEREZ <[email protected]>2019-10-09 21:00:07 +0200
commit46783061ceddee1fe8dd4f9aa9e71a2e6a293e7f (patch)
tree39844e383c16163c8f3cfdc92c06354353069dfd /tests/http
parent98940ef86c39217b8bdf61e06b8883024334c45c (diff)
Php cs fixer
Diffstat (limited to 'tests/http')
-rw-r--r--tests/http/cookie.php2
-rw-r--r--tests/http/data.php3
-rw-r--r--tests/http/echo.php2
-rw-r--r--tests/http/echoDelay.php2
-rw-r--r--tests/http/echoerr.php2
-rw-r--r--tests/http/env.php2
-rw-r--r--tests/http/error.php2
-rw-r--r--tests/http/error2.php2
-rw-r--r--tests/http/header.php2
-rw-r--r--tests/http/headers.php2
-rw-r--r--tests/http/ip.php2
-rw-r--r--tests/http/memleak.php6
-rw-r--r--tests/http/payload.php4
-rw-r--r--tests/http/pid.php2
-rw-r--r--tests/http/push.php2
-rw-r--r--tests/http/server.php2
-rw-r--r--tests/http/stuck.php2
-rw-r--r--tests/http/upload.php2
-rw-r--r--tests/http/user-agent.php2
19 files changed, 22 insertions, 23 deletions
diff --git a/tests/http/cookie.php b/tests/http/cookie.php
index 196ceee2..97673ef5 100644
--- a/tests/http/cookie.php
+++ b/tests/http/cookie.php
@@ -331,4 +331,4 @@ final class Cookie
{
return $this->createHeader();
}
-} \ No newline at end of file
+}
diff --git a/tests/http/data.php b/tests/http/data.php
index c5e0bab0..6570936a 100644
--- a/tests/http/data.php
+++ b/tests/http/data.php
@@ -5,7 +5,6 @@ use Psr\Http\Message\ServerRequestInterface;
function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
-
$data = $req->getParsedBody();
ksort($data);
@@ -15,4 +14,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(json_encode($data));
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/echo.php b/tests/http/echo.php
index 7004ada0..08e29a26 100644
--- a/tests/http/echo.php
+++ b/tests/http/echo.php
@@ -7,4 +7,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
{
$resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
return $resp->withStatus(201);
-} \ No newline at end of file
+}
diff --git a/tests/http/echoDelay.php b/tests/http/echoDelay.php
index 2ee2b049..78e85477 100644
--- a/tests/http/echoDelay.php
+++ b/tests/http/echoDelay.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
sleep(1);
$resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
return $resp->withStatus(201);
-} \ No newline at end of file
+}
diff --git a/tests/http/echoerr.php b/tests/http/echoerr.php
index da2ff4d8..7e1d05e7 100644
--- a/tests/http/echoerr.php
+++ b/tests/http/echoerr.php
@@ -9,4 +9,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
return $resp->withStatus(201);
-} \ No newline at end of file
+}
diff --git a/tests/http/env.php b/tests/http/env.php
index 1e29926f..3755bdea 100644
--- a/tests/http/env.php
+++ b/tests/http/env.php
@@ -7,4 +7,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
{
$resp->getBody()->write($_SERVER['ENV_KEY']);
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/error.php b/tests/http/error.php
index 6df0d4b5..527e4068 100644
--- a/tests/http/error.php
+++ b/tests/http/error.php
@@ -6,4 +6,4 @@ use Psr\Http\Message\ServerRequestInterface;
function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
throw new Error("error");
-} \ No newline at end of file
+}
diff --git a/tests/http/error2.php b/tests/http/error2.php
index 617b5a3f..12a672ac 100644
--- a/tests/http/error2.php
+++ b/tests/http/error2.php
@@ -6,4 +6,4 @@ use Psr\Http\Message\ServerRequestInterface;
function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
exit();
-} \ No newline at end of file
+}
diff --git a/tests/http/header.php b/tests/http/header.php
index e5b295b6..393d9623 100644
--- a/tests/http/header.php
+++ b/tests/http/header.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(strtoupper($req->getHeaderLine('input')));
return $resp->withAddedHeader("Header", $req->getQueryParams()['hello']);
-} \ No newline at end of file
+}
diff --git a/tests/http/headers.php b/tests/http/headers.php
index c85d5caf..b6f3967a 100644
--- a/tests/http/headers.php
+++ b/tests/http/headers.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(json_encode($req->getHeaders()));
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/ip.php b/tests/http/ip.php
index 2253e3f8..49eb9285 100644
--- a/tests/http/ip.php
+++ b/tests/http/ip.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write($req->getServerParams()['REMOTE_ADDR']);
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/memleak.php b/tests/http/memleak.php
index 82f08f88..2df7ae63 100644
--- a/tests/http/memleak.php
+++ b/tests/http/memleak.php
@@ -7,6 +7,6 @@ $mem = '';
function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
- $mem .= str_repeat(" ", 1024*1024);
- return $resp;
-} \ No newline at end of file
+ $mem .= str_repeat(" ", 1024*1024);
+ return $resp;
+}
diff --git a/tests/http/payload.php b/tests/http/payload.php
index 52c0f819..b7a0311f 100644
--- a/tests/http/payload.php
+++ b/tests/http/payload.php
@@ -5,7 +5,7 @@ use Psr\Http\Message\ServerRequestInterface;
function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
- if ( $req->getHeaderLine("Content-Type") != 'application/json' ) {
+ if ($req->getHeaderLine("Content-Type") != 'application/json') {
$resp->getBody()->write("invalid content-type");
return $resp;
}
@@ -15,4 +15,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(json_encode(array_flip($p)));
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/pid.php b/tests/http/pid.php
index 0c9a4e4d..f22d8e23 100644
--- a/tests/http/pid.php
+++ b/tests/http/pid.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write((string)getmypid());
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/push.php b/tests/http/push.php
index bf56dbb6..efe9eeda 100644
--- a/tests/http/push.php
+++ b/tests/http/push.php
@@ -7,4 +7,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
{
$resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
return $resp->withAddedHeader("http2-push", __FILE__)->withStatus(201);
-} \ No newline at end of file
+}
diff --git a/tests/http/server.php b/tests/http/server.php
index e5b295b6..393d9623 100644
--- a/tests/http/server.php
+++ b/tests/http/server.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(strtoupper($req->getHeaderLine('input')));
return $resp->withAddedHeader("Header", $req->getQueryParams()['hello']);
-} \ No newline at end of file
+}
diff --git a/tests/http/stuck.php b/tests/http/stuck.php
index 7df8b0f7..2dea0572 100644
--- a/tests/http/stuck.php
+++ b/tests/http/stuck.php
@@ -8,4 +8,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
sleep(10);
$resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
return $resp->withStatus(201);
-} \ No newline at end of file
+}
diff --git a/tests/http/upload.php b/tests/http/upload.php
index 2f7c0b64..bb4af766 100644
--- a/tests/http/upload.php
+++ b/tests/http/upload.php
@@ -32,4 +32,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
$resp->getBody()->write(json_encode($files, JSON_UNESCAPED_SLASHES));
return $resp;
-} \ No newline at end of file
+}
diff --git a/tests/http/user-agent.php b/tests/http/user-agent.php
index 029f49e9..03d7a2c8 100644
--- a/tests/http/user-agent.php
+++ b/tests/http/user-agent.php
@@ -7,4 +7,4 @@ function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): Re
{
$resp->getBody()->write($_SERVER['HTTP_USER_AGENT']);
return $resp;
-} \ No newline at end of file
+}