Skip to content

Commit f2552c5

Browse files
committed
refactor: cleans up retrieving request method
1 parent 53ccb48 commit f2552c5

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

src/Providers/Http/DTO/Request.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,9 @@ public function __construct(HttpMethodEnum $method, string $uri, array $headers
8181
*
8282
* @since n.e.x.t
8383
*
84-
* @return string The HTTP method.
84+
* @return HttpMethodEnum The HTTP method.
8585
*/
86-
public function getMethod(): string
87-
{
88-
return $this->method->value;
89-
}
90-
91-
/**
92-
* Gets the HTTP method enum.
93-
*
94-
* @since n.e.x.t
95-
*
96-
* @return HttpMethodEnum The HTTP method enum.
97-
*/
98-
public function getMethodEnum(): HttpMethodEnum
86+
public function getMethod(): HttpMethodEnum
9987
{
10088
return $this->method;
10189
}

src/Providers/Http/HttpTransporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function send(Request $request): Response
8484
private function convertToPsr7Request(Request $request): RequestInterface
8585
{
8686
$psr7Request = $this->requestFactory->createRequest(
87-
$request->getMethod(),
87+
$request->getMethod()->value,
8888
$request->getUri()
8989
);
9090

0 commit comments

Comments
 (0)