Skip to content

Commit e5d432f

Browse files
committed
Updated code style to new dev tools requirements
1 parent 749451a commit e5d432f

File tree

7 files changed

+32
-1
lines changed

7 files changed

+32
-1
lines changed

src/Cookie.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ interface Cookie
2020
const NAME_EXTRA_CHARS = '!\#$%&\'*+\-.^_`|~';
2121
const VALUE_EXTRA_CHARS = self::NAME_EXTRA_CHARS . '\/:=?\@()[\]{}<>';
2222

23+
/**
24+
* @return string
25+
*/
2326
public function name(): string;
2427

2528
/**

src/Cookie/CookieSetup.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class CookieSetup
2323
private $responseHeaders;
2424
private $directives;
2525

26+
/**
27+
* @param ResponseHeaders $responseHeaders
28+
*/
2629
public function __construct(ResponseHeaders $responseHeaders)
2730
{
2831
$this->responseHeaders = $responseHeaders;

src/Cookie/HeadersContextCookie.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ class HeadersContextCookie implements Cookie
2727

2828
private $sent = false;
2929

30+
/**
31+
* @param string $name
32+
* @param array $directives
33+
* @param ResponseHeaders $headers
34+
*/
3035
public function __construct(string $name, array $directives, ResponseHeaders $headers)
3136
{
3237
$this->name = $this->validName($name);

src/Header.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@
1616

1717
interface Header
1818
{
19+
/**
20+
* @param MessageInterface $message
21+
*
22+
* @return MessageInterface New Message instance with modified headers
23+
*/
1924
public function addToMessage(MessageInterface $message): MessageInterface;
2025
}

src/Header/SetCookieHeader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ class SetCookieHeader implements Header
1919
{
2020
private $header;
2121

22+
/**
23+
* @param string $header
24+
*/
2225
public function __construct(string $header)
2326
{
2427
$this->header = $header;

src/ResponseHeaders.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,22 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
3939
return $response;
4040
}
4141

42+
/**
43+
* Adds Header that will modify server Response.
44+
*
45+
* @param Header $header
46+
*/
4247
public function push(Header $header): void
4348
{
4449
$this->headers[] = $header;
4550
}
4651

52+
/**
53+
* CookieSetup object can be used to configure Cookie header
54+
* in server Response.
55+
*
56+
* @return CookieSetup
57+
*/
4758
public function cookieSetup(): CookieSetup
4859
{
4960
return new CookieSetup($this);

tests/HeadersContextCookieTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public function testInstantiation()
3333

3434
public function testStandardSetup()
3535
{
36-
$this->cookieSetup($context)->directives(['Expires' => $this->fixedDate(7200)])
36+
$this->cookieSetup($context)
37+
->directives(['Expires' => $this->fixedDate(7200)])
3738
->cookie('name')
3839
->send('value');
3940

0 commit comments

Comments
 (0)