Skip to content

Commit 5a2e7f2

Browse files
committed
Add inherited return types to ServiceRequestDecorator
1 parent 781eaef commit 5a2e7f2

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

src/FreeElephants/JsonApiToolkit/JsonApi/Request/JsonApiServerRequestDecorator.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,122 +20,122 @@ public function __construct(ServerRequestInterface $request, RouteFactory $route
2020
$this->request = $request;
2121
}
2222

23-
public function getProtocolVersion()
23+
public function getProtocolVersion(): string
2424
{
2525
return $this->request->getProtocolVersion();
2626
}
2727

28-
public function withProtocolVersion($version)
28+
public function withProtocolVersion($version): \Psr\Http\Message\MessageInterface
2929
{
3030
return $this->request->withProtocolVersion($version);
3131
}
3232

33-
public function getHeaders()
33+
public function getHeaders(): array
3434
{
3535
return $this->request->getHeaders();
3636
}
3737

38-
public function hasHeader($name)
38+
public function hasHeader($name): bool
3939
{
4040
return $this->request->hasHeader($name);
4141
}
4242

43-
public function getHeader($name)
43+
public function getHeader($name): array
4444
{
4545
return $this->request->getHeader($name);
4646
}
4747

48-
public function getHeaderLine($name)
48+
public function getHeaderLine($name): string
4949
{
5050
return $this->request->getHeaderLine($name);
5151
}
5252

53-
public function withHeader($name, $value)
53+
public function withHeader($name, $value): \Psr\Http\Message\MessageInterface
5454
{
5555
return $this->request->withHeader($name, $value);
5656
}
5757

58-
public function withAddedHeader($name, $value)
58+
public function withAddedHeader($name, $value): \Psr\Http\Message\MessageInterface
5959
{
6060
return $this->request->withAddedHeader($name, $value);
6161
}
6262

63-
public function withoutHeader($name)
63+
public function withoutHeader($name): \Psr\Http\Message\MessageInterface
6464
{
6565
return $this->request->withoutHeader($name);
6666
}
6767

68-
public function getBody()
68+
public function getBody(): StreamInterface
6969
{
7070
return $this->request->getBody();
7171
}
7272

73-
public function withBody(StreamInterface $body)
73+
public function withBody(StreamInterface $body): \Psr\Http\Message\MessageInterface
7474
{
7575
return $this->request->withBody($body);
7676
}
7777

78-
public function getRequestTarget()
78+
public function getRequestTarget(): string
7979
{
8080
return $this->request->getRequestTarget();
8181
}
8282

83-
public function withRequestTarget($requestTarget)
83+
public function withRequestTarget($requestTarget): \Psr\Http\Message\RequestInterface
8484
{
8585
return $this->request->withRequestTarget($requestTarget);
8686
}
8787

88-
public function getMethod()
88+
public function getMethod(): string
8989
{
9090
return $this->request->getMethod();
9191
}
9292

93-
public function withMethod($method)
93+
public function withMethod($method): \Psr\Http\Message\RequestInterface
9494
{
9595
return $this->request->withMethod($method);
9696
}
9797

98-
public function getUri()
98+
public function getUri(): UriInterface
9999
{
100100
return $this->request->getUri();
101101
}
102102

103-
public function withUri(UriInterface $uri, $preserveHost = false)
103+
public function withUri(UriInterface $uri, $preserveHost = false): \Psr\Http\Message\RequestInterface
104104
{
105105
return $this->request->withUri($uri, $preserveHost);
106106
}
107107

108-
public function getServerParams()
108+
public function getServerParams(): array
109109
{
110110
return $this->request->getServerParams();
111111
}
112112

113-
public function getCookieParams()
113+
public function getCookieParams(): array
114114
{
115115
return $this->request->getCookieParams();
116116
}
117117

118-
public function withCookieParams(array $cookies)
118+
public function withCookieParams(array $cookies): ServerRequestInterface
119119
{
120120
return $this->request->withCookieParams($cookies);
121121
}
122122

123-
public function getQueryParams()
123+
public function getQueryParams(): array
124124
{
125125
return $this->request->getQueryParams();
126126
}
127127

128-
public function withQueryParams(array $query)
128+
public function withQueryParams(array $query): ServerRequestInterface
129129
{
130130
return $this->request->withQueryParams($query);
131131
}
132132

133-
public function getUploadedFiles()
133+
public function getUploadedFiles(): array
134134
{
135135
return $this->request->getUploadedFiles();
136136
}
137137

138-
public function withUploadedFiles(array $uploadedFiles)
138+
public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface
139139
{
140140
return $this->request->withUploadedFiles($uploadedFiles);
141141
}
@@ -145,12 +145,12 @@ public function getParsedBody()
145145
return $this->request->getParsedBody();
146146
}
147147

148-
public function withParsedBody($data)
148+
public function withParsedBody($data): ServerRequestInterface
149149
{
150150
return $this->request->withParsedBody($data);
151151
}
152152

153-
public function getAttributes()
153+
public function getAttributes(): array
154154
{
155155
return $this->request->getAttributes();
156156
}
@@ -160,12 +160,12 @@ public function getAttribute($name, $default = null)
160160
return $this->request->getAttribute($name, $default);
161161
}
162162

163-
public function withAttribute($name, $value)
163+
public function withAttribute($name, $value): ServerRequestInterface
164164
{
165165
return $this->request->withAttribute($name, $value);
166166
}
167167

168-
public function withoutAttribute($name)
168+
public function withoutAttribute($name): ServerRequestInterface
169169
{
170170
return $this->request->withoutAttribute($name);
171171
}

0 commit comments

Comments
 (0)