summaryrefslogtreecommitdiff
path: root/tests/src/Http/Request.php
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2020-12-16 16:33:31 +0300
committerWolfy-J <[email protected]>2020-12-16 16:33:31 +0300
commit9f7db935333a222e411c9016e1effb803d2afdd1 (patch)
tree400d5f5b0b58addfaf8480e2d8d6e492ea9d0a00 /tests/src/Http/Request.php
parentd39a0735fe21d21c5aae20c4780458433a42250a (diff)
- removal of PHP code
Diffstat (limited to 'tests/src/Http/Request.php')
-rw-r--r--tests/src/Http/Request.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/src/Http/Request.php b/tests/src/Http/Request.php
deleted file mode 100644
index ef67e28d..00000000
--- a/tests/src/Http/Request.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/**
- * Spiral Framework.
- *
- * @license MIT
- * @author Anton Titov (Wolfy-J)
- */
-
-declare(strict_types=1);
-
-namespace Spiral\RoadRunner\Http;
-
-final class Request
-{
-
- public string $remoteAddr;
- public string $protocol;
- public string $method;
- public string $uri;
- public array $headers;
- public array $cookies;
- public array $uploads;
- public array $attributes;
- public array $query;
- public ?string $body;
- public bool $parsed;
-
- /**
- * @return string
- */
- public function getRemoteAddr(): string
- {
- return $this->attributes['ipAddress'] ?? $this->remoteAddr ?? '127.0.0.1';
- }
-
- /**
- * @return array|null
- */
- public function getParsedBody(): ?array
- {
- if ($this->parsed) {
- return json_decode($this->body, true);
- }
-
- return null;
- }
-}