Commit f649e58e authored by 谢宇轩's avatar 谢宇轩

fix: 优化一些单词描述

parent 6741f885
...@@ -200,7 +200,7 @@ class Application implements ClientInterface ...@@ -200,7 +200,7 @@ class Application implements ClientInterface
throw new TimeOutExcetpion($request, $exception); throw new TimeOutExcetpion($request, $exception);
} catch (GuzzleException $exception) { } catch (GuzzleException $exception) {
if ($this->logger) { if ($this->logger) {
$this->logger->error("sdk etrror, bad client!"); $this->logger->error("sdk error, bad client!");
} }
if (!($request instanceof SdkRequest)) { if (!($request instanceof SdkRequest)) {
throw new ApplicationException($exception->getMessage(), null, [], $exception); throw new ApplicationException($exception->getMessage(), null, [], $exception);
...@@ -240,7 +240,7 @@ class Application implements ClientInterface ...@@ -240,7 +240,7 @@ class Application implements ClientInterface
if ($this->logger) { if ($this->logger) {
$this->logger->error("sdk error, paypal service fail", $context); $this->logger->error("sdk error, paypal service fail", $context);
} }
throw new SdkException("SDK Upstram Failed", $request, $response, []); throw new SdkException("SDK Upstream Failed", $request, $response, []);
} }
if (in_array($response->getStatusCode(), [404, 405])) { if (in_array($response->getStatusCode(), [404, 405])) {
......
...@@ -3,12 +3,13 @@ declare(strict_types=1); ...@@ -3,12 +3,13 @@ declare(strict_types=1);
namespace Jiwei\EasyHttpSdk; namespace Jiwei\EasyHttpSdk;
use Closure;
use Jiwei\EasyHttpSdk\Policy\DefaultErrorHandlingPolicy; use Jiwei\EasyHttpSdk\Policy\DefaultErrorHandlingPolicy;
use Jiwei\EasyHttpSdk\Policy\HandlingPolicyInterface; use Jiwei\EasyHttpSdk\Policy\HandlingPolicyInterface;
abstract class Option abstract class Option
{ {
const ENDPONIT_HOSTS = [ const ENDPOINT_HOSTS = [
'local' => '', 'local' => '',
'development' => '', 'development' => '',
'production' => '' 'production' => ''
...@@ -28,9 +29,9 @@ abstract class Option ...@@ -28,9 +29,9 @@ abstract class Option
private $debug = false; private $debug = false;
/** /**
* @return \Closure * @return Closure
*/ */
abstract public function authorization(): \Closure; abstract public function authorization(): Closure;
/** /**
* 错误处理策略 * 错误处理策略
...@@ -105,7 +106,7 @@ abstract class Option ...@@ -105,7 +106,7 @@ abstract class Option
public function getBaseUrl(): string public function getBaseUrl(): string
{ {
return static::ENDPONIT_HOSTS[$this->getStage()] ?? ""; return static::ENDPOINT_HOSTS[$this->getStage()] ?? "";
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment