fix:更新已知bug,优化代码
This commit is contained in:
@@ -18,5 +18,5 @@ interface ConfigInterface
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function set(string $key, $value);
|
||||
public function set(string $key, $value): void;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,19 @@ declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Contract;
|
||||
|
||||
use DI\FactoryInterface;
|
||||
use Invoker\InvokerInterface;
|
||||
|
||||
interface ContainerInterface extends \Psr\Container\ContainerInterface, FactoryInterface, InvokerInterface
|
||||
interface ContainerInterface extends \Psr\Container\ContainerInterface
|
||||
{
|
||||
/**
|
||||
* factory make.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function make(string $name, array $parameters = []);
|
||||
|
||||
/**
|
||||
* @param mixed $entry
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function set(string $name, $entry);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Contract;
|
||||
|
||||
use GuzzleHttp\ClientInterface;
|
||||
use Psr\Http\Client\ClientInterface;
|
||||
|
||||
interface HttpClientInterface extends ClientInterface, \Psr\Http\Client\ClientInterface
|
||||
interface HttpClientInterface extends ClientInterface
|
||||
{
|
||||
}
|
||||
|
||||
@@ -12,12 +12,11 @@ interface ProviderInterface
|
||||
/**
|
||||
* pay.
|
||||
*
|
||||
* @throws \Yansongda\Pay\Exception\ContainerDependencyException
|
||||
* @return \Psr\Http\Message\MessageInterface|\Yansongda\Supports\Collection|array|null
|
||||
*
|
||||
* @throws \Yansongda\Pay\Exception\ContainerException
|
||||
* @throws \Yansongda\Pay\Exception\InvalidParamsException
|
||||
* @throws \Yansongda\Pay\Exception\ServiceNotFoundException
|
||||
*
|
||||
* @return \Psr\Http\Message\MessageInterface|\Yansongda\Supports\Collection|array|null
|
||||
*/
|
||||
public function pay(array $plugins, array $params);
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Contract;
|
||||
|
||||
use Yansongda\Pay\Pay;
|
||||
|
||||
interface ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* register the service.
|
||||
* @param mixed $data
|
||||
*
|
||||
* @throws \Yansongda\Pay\Exception\ContainerException
|
||||
*/
|
||||
public function register(Pay $pay, ?array $data = null): void;
|
||||
public function register($data = null): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user