Skip to content

Commit 7848b93

Browse files
author
Paul M. Jones
committed
Merge pull request #21 from graste/master
[PSR-7] Changed verbiage of $header and $attribute arguments
2 parents 3e35e0a + 0d42abf commit 7848b93

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/MessageInterface.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ public function getHeaders();
6969
/**
7070
* Checks if a header exists by the given case-insensitive name.
7171
*
72-
* @param string $header Case-insensitive header name.
72+
* @param string $name Case-insensitive header field name.
7373
* @return bool Returns true if any header names match the given header
7474
* name using a case-insensitive string comparison. Returns false if
7575
* no matching header name is found in the message.
7676
*/
77-
public function hasHeader($header);
77+
public function hasHeader($name);
7878

7979
/**
8080
* Retrieve a header by the given case-insensitive name, as a string.
@@ -87,18 +87,18 @@ public function hasHeader($header);
8787
* comma concatenation. For such headers, use getHeaderLines() instead
8888
* and supply your own delimiter when concatenating.
8989
*
90-
* @param string $header Case-insensitive header name.
90+
* @param string $name Case-insensitive header field name.
9191
* @return string
9292
*/
93-
public function getHeader($header);
93+
public function getHeader($name);
9494

9595
/**
9696
* Retrieves a header by the given case-insensitive name as an array of strings.
9797
*
98-
* @param string $header Case-insensitive header name.
98+
* @param string $name Case-insensitive header field name.
9999
* @return string[]
100100
*/
101-
public function getHeaderLines($header);
101+
public function getHeaderLines($name);
102102

103103
/**
104104
* Create a new instance with the provided header, replacing any existing
@@ -111,12 +111,12 @@ public function getHeaderLines($header);
111111
* immutability of the message, and MUST return a new instance that has the
112112
* new and/or updated header and value.
113113
*
114-
* @param string $header Header name
114+
* @param string $name Case-insensitive header field name.
115115
* @param string|string[] $value Header value(s).
116116
* @return self
117117
* @throws \InvalidArgumentException for invalid header names or values.
118118
*/
119-
public function withHeader($header, $value);
119+
public function withHeader($name, $value);
120120

121121
/**
122122
* Creates a new instance, with the specified header appended with the
@@ -130,12 +130,12 @@ public function withHeader($header, $value);
130130
* immutability of the message, and MUST return a new instance that has the
131131
* new header and/or value.
132132
*
133-
* @param string $header Header name to add
133+
* @param string $name Case-insensitive header field name to add.
134134
* @param string|string[] $value Header value(s).
135135
* @return self
136136
* @throws \InvalidArgumentException for invalid header names or values.
137137
*/
138-
public function withAddedHeader($header, $value);
138+
public function withAddedHeader($name, $value);
139139

140140
/**
141141
* Creates a new instance, without the specified header.
@@ -146,10 +146,10 @@ public function withAddedHeader($header, $value);
146146
* immutability of the message, and MUST return a new instance that removes
147147
* the named header.
148148
*
149-
* @param string $header HTTP header to remove
149+
* @param string $name Case-insensitive header field name to remove.
150150
* @return self
151151
*/
152-
public function withoutHeader($header);
152+
public function withoutHeader($name);
153153

154154
/**
155155
* Gets the body of the message.

src/ServerRequestInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ public function getAttributes();
187187
* specifying a default value to return if the attribute is not found.
188188
*
189189
* @see getAttributes()
190-
* @param string $attribute Attribute name.
190+
* @param string $name The attribute name.
191191
* @param mixed $default Default value to return if the attribute does not exist.
192192
* @return mixed
193193
*/
194-
public function getAttribute($attribute, $default = null);
194+
public function getAttribute($name, $default = null);
195195

196196
/**
197197
* Create a new instance with the specified derived request attribute.
@@ -204,11 +204,11 @@ public function getAttribute($attribute, $default = null);
204204
* updated attribute.
205205
*
206206
* @see getAttributes()
207-
* @param string $attribute The attribute name.
207+
* @param string $name The attribute name.
208208
* @param mixed $value The value of the attribute.
209209
* @return self
210210
*/
211-
public function withAttribute($attribute, $value);
211+
public function withAttribute($name, $value);
212212

213213
/**
214214
* Create a new instance that removes the specified derived request
@@ -222,8 +222,8 @@ public function withAttribute($attribute, $value);
222222
* the attribute.
223223
*
224224
* @see getAttributes()
225-
* @param string $attribute The attribute name.
225+
* @param string $name The attribute name.
226226
* @return self
227227
*/
228-
public function withoutAttribute($attribute);
228+
public function withoutAttribute($name);
229229
}

src/UriInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public function withFragment($fragment);
254254
*
255255
* - If a scheme is present, "://" MUST append the value.
256256
* - If the authority information is present, that value will be
257-
* contatenated.
257+
* concatenated.
258258
* - If a path is present, it MUST be prefixed by a "/" character.
259259
* - If a query string is present, it MUST be prefixed by a "?" character.
260260
* - If a URI fragment is present, it MUST be prefixed by a "#" character.

0 commit comments

Comments
 (0)