Skip to content

Commit c4f7d8c

Browse files
code review: add types
1 parent e1af7eb commit c4f7d8c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Endpoint/Rest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function configureRequest(Request $request, $data): Request
4949
return $request;
5050
}
5151

52-
public function get($data = null)
52+
public function get(mixed $data = null): static
5353
{
5454
$this->setProperty(self::PROPERTY_HTTP_METHOD, 'GET');
5555
if (!is_null($data)) {
@@ -58,7 +58,7 @@ public function get($data = null)
5858
return $this->execute();
5959
}
6060

61-
public function post($data = null)
61+
public function post(mixed $data = null): static
6262
{
6363
$this->setProperty(self::PROPERTY_HTTP_METHOD, 'POST');
6464
if (!is_null($data)) {
@@ -67,7 +67,7 @@ public function post($data = null)
6767
return $this->execute();
6868
}
6969

70-
public function put($data = null)
70+
public function put(mixed $data = null): static
7171
{
7272
$this->setProperty(self::PROPERTY_HTTP_METHOD, 'PUT');
7373
if (!is_null($data)) {
@@ -76,13 +76,13 @@ public function put($data = null)
7676
return $this->execute();
7777
}
7878

79-
public function delete()
79+
public function delete(): static
8080
{
8181
$this->setProperty(self::PROPERTY_HTTP_METHOD, 'DELETE');
8282
return $this->execute();
8383
}
8484

85-
public function patch($data = null)
85+
public function patch(mixed $data = null): static
8686
{
8787
$this->setProperty(self::PROPERTY_HTTP_METHOD, 'PATCH');
8888
if (!is_null($data)) {

0 commit comments

Comments
 (0)