summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Titov <[email protected]>2019-10-10 10:36:11 +0300
committerGitHub <[email protected]>2019-10-10 10:36:11 +0300
commit8a840c40828c1fb31c69fc846a85738ddef0a7c7 (patch)
tree39844e383c16163c8f3cfdc92c06354353069dfd
parent98940ef86c39217b8bdf61e06b8883024334c45c (diff)
parent46783061ceddee1fe8dd4f9aa9e71a2e6a293e7f (diff)
Merge pull request #191 from ScullWM/master_phpcsfix
Php cs fixer
-rw-r--r--src/Diactoros/ServerRequestFactory.php2
-rw-r--r--src/Diactoros/StreamFactory.php2
-rw-r--r--src/Diactoros/UploadedFileFactory.php2
-rw-r--r--src/Exception/MetricException.php3
-rw-r--r--src/Exception/RoadRunnerException.php3
-rw-r--r--src/Exceptions/RoadRunnerException.php3
-rw-r--r--src/Metrics.php2
-rw-r--r--src/MetricsInterface.php2
-rw-r--r--src/Worker.php5
-rw-r--r--tests/broken.php2
-rw-r--r--tests/delay.php2
-rw-r--r--tests/echo.php2
-rw-r--r--tests/error.php2
-rw-r--r--tests/failboot.php2
-rw-r--r--tests/head.php2
-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
-rw-r--r--tests/pid.php2
-rw-r--r--tests/slow-client.php2
-rw-r--r--tests/slow-destroy.php2
-rw-r--r--tests/slow-pid.php2
-rw-r--r--tests/stop.php2
39 files changed, 44 insertions, 47 deletions
diff --git a/src/Diactoros/ServerRequestFactory.php b/src/Diactoros/ServerRequestFactory.php
index cb534577..d4ec92b9 100644
--- a/src/Diactoros/ServerRequestFactory.php
+++ b/src/Diactoros/ServerRequestFactory.php
@@ -22,4 +22,4 @@ final class ServerRequestFactory implements ServerRequestFactoryInterface
$uploadedFiles = [];
return new ServerRequest($serverParams, $uploadedFiles, $uri, $method);
}
-} \ No newline at end of file
+}
diff --git a/src/Diactoros/StreamFactory.php b/src/Diactoros/StreamFactory.php
index 1c51d911..1a7f975e 100644
--- a/src/Diactoros/StreamFactory.php
+++ b/src/Diactoros/StreamFactory.php
@@ -41,4 +41,4 @@ final class StreamFactory implements StreamFactoryInterface
{
return new Stream($resource);
}
-} \ No newline at end of file
+}
diff --git a/src/Diactoros/UploadedFileFactory.php b/src/Diactoros/UploadedFileFactory.php
index 7de9a30f..36a0554e 100644
--- a/src/Diactoros/UploadedFileFactory.php
+++ b/src/Diactoros/UploadedFileFactory.php
@@ -31,4 +31,4 @@ final class UploadedFileFactory implements UploadedFileFactoryInterface
return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
}
-} \ No newline at end of file
+}
diff --git a/src/Exception/MetricException.php b/src/Exception/MetricException.php
index 2d12eefe..6f2e7fde 100644
--- a/src/Exception/MetricException.php
+++ b/src/Exception/MetricException.php
@@ -13,5 +13,4 @@ use Spiral\Goridge\Exceptions\RPCException;
class MetricException extends RPCException
{
-
-} \ No newline at end of file
+}
diff --git a/src/Exception/RoadRunnerException.php b/src/Exception/RoadRunnerException.php
index 348cb106..0f8d5def 100644
--- a/src/Exception/RoadRunnerException.php
+++ b/src/Exception/RoadRunnerException.php
@@ -10,5 +10,4 @@ namespace Spiral\RoadRunner\Exception;
class RoadRunnerException extends \Spiral\RoadRunner\Exceptions\RoadRunnerException
{
-
-} \ No newline at end of file
+}
diff --git a/src/Exceptions/RoadRunnerException.php b/src/Exceptions/RoadRunnerException.php
index 803e4e31..b044a16e 100644
--- a/src/Exceptions/RoadRunnerException.php
+++ b/src/Exceptions/RoadRunnerException.php
@@ -14,5 +14,4 @@ namespace Spiral\RoadRunner\Exceptions;
*/
class RoadRunnerException extends \RuntimeException
{
-
-} \ No newline at end of file
+}
diff --git a/src/Metrics.php b/src/Metrics.php
index c17b96eb..d204a585 100644
--- a/src/Metrics.php
+++ b/src/Metrics.php
@@ -100,4 +100,4 @@ final class Metrics implements MetricsInterface
throw new MetricException($e->getMessage(), $e->getCode(), $e);
}
}
-} \ No newline at end of file
+}
diff --git a/src/MetricsInterface.php b/src/MetricsInterface.php
index 04756216..a809536c 100644
--- a/src/MetricsInterface.php
+++ b/src/MetricsInterface.php
@@ -56,4 +56,4 @@ interface MetricsInterface
* @throws MetricException
*/
public function set(string $collector, float $value, array $labels = []);
-} \ No newline at end of file
+}
diff --git a/src/Worker.php b/src/Worker.php
index b67ebd3b..2659af5c 100644
--- a/src/Worker.php
+++ b/src/Worker.php
@@ -149,7 +149,8 @@ class Worker
// PID negotiation (socket connections only)
if (!empty($p['pid'])) {
$this->relay->send(
- sprintf('{"pid":%s}', getmypid()), Relay::PAYLOAD_CONTROL
+ sprintf('{"pid":%s}', getmypid()),
+ Relay::PAYLOAD_CONTROL
);
}
@@ -163,4 +164,4 @@ class Worker
return true;
}
-} \ No newline at end of file
+}
diff --git a/tests/broken.php b/tests/broken.php
index b1a3839e..42b4e7c2 100644
--- a/tests/broken.php
+++ b/tests/broken.php
@@ -11,4 +11,4 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->receive($ctx)) {
echo undefined_function();
$rr->send((string)$in);
-} \ No newline at end of file
+}
diff --git a/tests/delay.php b/tests/delay.php
index bfde2fc4..bf9ecc12 100644
--- a/tests/delay.php
+++ b/tests/delay.php
@@ -15,4 +15,4 @@ while ($in = $rr->receive($ctx)) {
} catch (\Throwable $e) {
$rr->error((string)$e);
}
-} \ No newline at end of file
+}
diff --git a/tests/echo.php b/tests/echo.php
index ba58ff30..1570e3df 100644
--- a/tests/echo.php
+++ b/tests/echo.php
@@ -14,4 +14,4 @@ while ($in = $rr->receive($ctx)) {
} catch (\Throwable $e) {
$rr->error((string)$e);
}
-} \ No newline at end of file
+}
diff --git a/tests/error.php b/tests/error.php
index ebd3418b..8e1c8d0d 100644
--- a/tests/error.php
+++ b/tests/error.php
@@ -10,4 +10,4 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->receive($ctx)) {
$rr->error((string)$in);
-} \ No newline at end of file
+}
diff --git a/tests/failboot.php b/tests/failboot.php
index fa8b96f6..d59462cd 100644
--- a/tests/failboot.php
+++ b/tests/failboot.php
@@ -1,3 +1,3 @@
<?php
ini_set('display_errors', 'stderr');
-throw new Error("failboot error"); \ No newline at end of file
+throw new Error("failboot error");
diff --git a/tests/head.php b/tests/head.php
index 4f4e4061..88ebd3f2 100644
--- a/tests/head.php
+++ b/tests/head.php
@@ -14,4 +14,4 @@ while ($in = $rr->receive($ctx)) {
} catch (\Throwable $e) {
$rr->error((string)$e);
}
-} \ No newline at end of file
+}
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
+}
diff --git a/tests/pid.php b/tests/pid.php
index bc1928a6..bf10a025 100644
--- a/tests/pid.php
+++ b/tests/pid.php
@@ -14,4 +14,4 @@
} catch (\Throwable $e) {
$rr->error((string)$e);
}
- } \ No newline at end of file
+ }
diff --git a/tests/slow-client.php b/tests/slow-client.php
index f09142b5..bc4b0561 100644
--- a/tests/slow-client.php
+++ b/tests/slow-client.php
@@ -35,4 +35,4 @@ switch ($goridge) {
usleep($bootDelay * 1000);
require_once sprintf("%s/%s.php", __DIR__, $test);
-usleep($shutdownDelay * 1000); \ No newline at end of file
+usleep($shutdownDelay * 1000);
diff --git a/tests/slow-destroy.php b/tests/slow-destroy.php
index 0f0abc1c..6af61050 100644
--- a/tests/slow-destroy.php
+++ b/tests/slow-destroy.php
@@ -34,4 +34,4 @@ switch ($goridge) {
require_once sprintf("%s/%s.php", __DIR__, $test);
-sleep(10); \ No newline at end of file
+sleep(10);
diff --git a/tests/slow-pid.php b/tests/slow-pid.php
index daaf2583..747e7e86 100644
--- a/tests/slow-pid.php
+++ b/tests/slow-pid.php
@@ -15,4 +15,4 @@
} catch (\Throwable $e) {
$rr->error((string)$e);
}
- } \ No newline at end of file
+ }
diff --git a/tests/stop.php b/tests/stop.php
index caa485d6..0100ad0f 100644
--- a/tests/stop.php
+++ b/tests/stop.php
@@ -22,4 +22,4 @@ while ($in = $rr->receive($ctx)) {
} catch (\Throwable $e) {
$rr->error((string)$e);
}
-} \ No newline at end of file
+}