Skip to content

Commit 4afba9a

Browse files
committed
Removes custom message interfaces, removes interface suffix, closes #2, closes #8
1 parent f335c53 commit 4afba9a

File tree

5 files changed

+11
-80
lines changed

5 files changed

+11
-80
lines changed

src/Message/InternalRequestInterface.php renamed to src/Message/InternalRequest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111

1212
namespace Http\Adapter\Message;
1313

14+
use Psr\Http\Message\RequestInterface;
15+
1416
/**
1517
* @author GeLo <[email protected]>
1618
*/
17-
interface InternalRequestInterface extends RequestInterface
19+
interface InternalRequest extends RequestInterface, ParameteredMessage
1820
{
1921
/**
2022
* Returns some data by name

src/Message/MessageFactoryInterface.php renamed to src/Message/MessageFactory.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313

1414
use Http\Adapter\HttpAdapterException;
1515
use Psr\Http\Message\UriInterface;
16+
use Psr\Http\Message\RequestInterface;
17+
use Psr\Http\Message\ResponseInterface;
1618
use Psr\Http\Message\StreamInterface;
1719

1820
/**
1921
* @author GeLo <[email protected]>
2022
*/
21-
interface MessageFactoryInterface
23+
interface MessageFactory
2224
{
2325
/**
2426
* Returns the base URI
@@ -58,7 +60,7 @@ public function setBaseUri($baseUri);
5860
public function createRequest(
5961
$method,
6062
$uri,
61-
$protocolVersion = RequestInterface::PROTOCOL_VERSION_1_1,
63+
$protocolVersion = '1.1',
6264
array $headers = [],
6365
$body = null,
6466
array $parameters = []
@@ -75,12 +77,12 @@ public function createRequest(
7577
* @param array $files
7678
* @param array $parameters
7779
*
78-
* @return InternalRequestInterface
80+
* @return InternalRequest
7981
*/
8082
public function createInternalRequest(
8183
$method,
8284
$uri,
83-
$protocolVersion = RequestInterface::PROTOCOL_VERSION_1_1,
85+
$protocolVersion = '1.1',
8486
array $headers = [],
8587
$data = [],
8688
array $files = [],
@@ -100,7 +102,7 @@ public function createInternalRequest(
100102
*/
101103
public function createResponse(
102104
$statusCode = 200,
103-
$protocolVersion = RequestInterface::PROTOCOL_VERSION_1_1,
105+
$protocolVersion = '1.1',
104106
array $headers = [],
105107
$body = null,
106108
array $parameters = []

src/Message/MessageInterface.php renamed to src/Message/ParameteredMessage.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,11 @@
1111

1212
namespace Http\Adapter\Message;
1313

14-
use Psr\Http\Message\MessageInterface as PsrMessageInterface;
15-
1614
/**
1715
* @author GeLo <[email protected]>
1816
*/
19-
interface MessageInterface extends PsrMessageInterface
17+
interface ParameteredMessage
2018
{
21-
/** @const string */
22-
const PROTOCOL_VERSION_1_0 = '1.0';
23-
24-
/** @const string */
25-
const PROTOCOL_VERSION_1_1 = '1.1';
26-
2719
/**
2820
* Returns a parameter by name
2921
*

src/Message/RequestInterface.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/Message/ResponseInterface.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)