Skip to content

Commit 7fe250c

Browse files
committed
Added usage section to class level docblock.
- Also aligned constant definitions.
1 parent 4b19690 commit 7fe250c

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

src/RequestMethodInterface.php

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
<?php
2+
23
namespace Psr\Http\Message;
34

45
/**
5-
* The interface defines constants request method
6+
* Defines constants for common HTTP request methods.
7+
*
8+
* Usage:
9+
*
10+
* <code>
11+
* class RequestFactory implements RequestMethodInterface
12+
* {
13+
* public static function factory(
14+
* $uri = '/',
15+
* $method = self::METHOD_GET,
16+
* $data = []
17+
* ) {
18+
* }
19+
* }
20+
* </code>
621
*/
7-
interface RequestMethodInterface {
8-
const METHOD_HEAD = 'HEAD';
9-
const METHOD_GET = 'GET';
10-
const METHOD_POST = 'POST';
11-
const METHOD_PUT = 'PUT';
12-
const METHOD_PATCH = 'PATCH';
13-
const METHOD_DELETE = 'DELETE';
14-
const METHOD_PURGE = 'PURGE';
22+
interface RequestMethodInterface
23+
{
24+
const METHOD_HEAD = 'HEAD';
25+
const METHOD_GET = 'GET';
26+
const METHOD_POST = 'POST';
27+
const METHOD_PUT = 'PUT';
28+
const METHOD_PATCH = 'PATCH';
29+
const METHOD_DELETE = 'DELETE';
30+
const METHOD_PURGE = 'PURGE';
1531
const METHOD_OPTIONS = 'OPTIONS';
16-
const METHOD_TRACE = 'TRACE';
32+
const METHOD_TRACE = 'TRACE';
1733
const METHOD_CONNECT = 'CONNECT';
1834
}

0 commit comments

Comments
 (0)