Skip to content

Commit e694a5d

Browse files
committed
Client now has a client interface because it is marked final
1 parent 9faab8e commit e694a5d

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Interop\Container\ContainerInterface;
77
use React\Promise\CancellablePromiseInterface;
88

9-
final class Client
9+
final class Client implements ClientInterface
1010
{
1111
/**
1212
* @var ContainerInterface

src/ClientInterface.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace ApiClients\Foundation;
4+
5+
use Interop\Container\ContainerInterface;
6+
use React\Promise\CancellablePromiseInterface;
7+
8+
interface ClientInterface
9+
{
10+
/**
11+
* @return ContainerInterface
12+
*/
13+
public function getContainer(): ContainerInterface;
14+
15+
/**
16+
* @return mixed
17+
*/
18+
public function getFromContainer(string $id);
19+
20+
/**
21+
* @param $command
22+
* @return CancellablePromiseInterface
23+
*/
24+
public function handle($command): CancellablePromiseInterface;
25+
}

0 commit comments

Comments
 (0)