Skip to content

Commit 94e22b5

Browse files
authored
Merge pull request #39 from php-http/improve-phpdoc
clarify header plugin phpdoc
2 parents 55822ba + 8f1bc4f commit 94e22b5

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

src/Plugin/HeaderAppendPlugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
use Psr\Http\Message\RequestInterface;
77

88
/**
9-
* Adds headers to the request.
9+
* Append headers to the request.
10+
*
1011
* If the header already exists the value will be appended to the current value.
1112
*
1213
* This only makes sense for headers that can have multiple values like 'Forwarded'
@@ -23,7 +24,7 @@ final class HeaderAppendPlugin implements Plugin
2324
private $headers = [];
2425

2526
/**
26-
* @param array $headers headers to add to the request
27+
* @param array $headers Hashmap of header name to header value
2728
*/
2829
public function __construct(array $headers)
2930
{

src/Plugin/HeaderDefaultsPlugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
use Psr\Http\Message\RequestInterface;
77

88
/**
9-
* Set default values for the request headers.
9+
* Set header to default value if it does not exist.
10+
*
1011
* If a given header already exists the value wont be replaced and the request wont be changed.
1112
*
1213
* @author Soufiane Ghzal <[email protected]>
@@ -19,7 +20,7 @@ final class HeaderDefaultsPlugin implements Plugin
1920
private $headers = [];
2021

2122
/**
22-
* @param array $headers headers to set to the request
23+
* @param array $headers Hashmap of header name to header value
2324
*/
2425
public function __construct(array $headers)
2526
{

src/Plugin/HeaderRemovePlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class HeaderRemovePlugin implements Plugin
1818
private $headers = [];
1919

2020
/**
21-
* @param array $headers headers to remove from the request
21+
* @param array $headers List of header names to remove from the request
2222
*/
2323
public function __construct(array $headers)
2424
{

src/Plugin/HeaderSetPlugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
use Psr\Http\Message\RequestInterface;
77

88
/**
9-
* Set headers to the request.
9+
* Set headers on the request.
10+
*
1011
* If the header does not exist it wil be set, if the header already exists it will be replaced.
1112
*
1213
* @author Soufiane Ghzal <[email protected]>
@@ -19,7 +20,7 @@ final class HeaderSetPlugin implements Plugin
1920
private $headers = [];
2021

2122
/**
22-
* @param array $headers headers to set to the request
23+
* @param array $headers Hashmap of header name to header value
2324
*/
2425
public function __construct(array $headers)
2526
{

0 commit comments

Comments
 (0)