Преглед на файлове

refactor: 统一代码风格

runphp преди 2 седмици
родител
ревизия
66961b37b2
променени са 7 файла, в които са добавени 17 реда и са изтрити 6 реда
  1. 2 1
      config.php
  2. 1 0
      info.php
  3. 2 1
      src/Config.php
  4. 1 0
      src/Extension.php
  5. 3 1
      src/Facade/IDCardClient.php
  6. 4 2
      src/IDCardClient.php
  7. 4 1
      test/IDCardClientTest.php

+ 2 - 1
config.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
 
 
 return json_decode(<<<'JSON'
 return json_decode(<<<'JSON'
@@ -43,4 +44,4 @@ return json_decode(<<<'JSON'
     "_fc_drag_tag": "input"
     "_fc_drag_tag": "input"
   }
   }
 ]
 ]
-JSON, true);
+JSON, true);

+ 1 - 0
info.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
 return [
 return [
   'id' => 'aliyun_idcard',
   'id' => 'aliyun_idcard',

+ 2 - 1
src/Config.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
 
 
 namespace SixShop\AliyunIDCard;
 namespace SixShop\AliyunIDCard;
@@ -18,4 +19,4 @@ class Config
     {
     {
         return Extension::EXTENSION_ID;
         return Extension::EXTENSION_ID;
     }
     }
-}
+}

+ 1 - 0
src/Extension.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
 
 
 namespace SixShop\AliyunIDCard;
 namespace SixShop\AliyunIDCard;

+ 3 - 1
src/Facade/IDCardClient.php

@@ -1,5 +1,7 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
+
 namespace SixShop\AliyunIDCard\Facade;
 namespace SixShop\AliyunIDCard\Facade;
 
 
 use think\Facade;
 use think\Facade;
@@ -13,4 +15,4 @@ class IDCardClient extends Facade
     {
     {
         return \SixShop\AliyunIDCard\IDCardClient::class;
         return \SixShop\AliyunIDCard\IDCardClient::class;
     }
     }
-}
+}

+ 4 - 2
src/IDCardClient.php

@@ -1,14 +1,16 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
+
 namespace SixShop\AliyunIDCard;
 namespace SixShop\AliyunIDCard;
 
 
 use Symfony\Component\HttpClient\HttpClient;
 use Symfony\Component\HttpClient\HttpClient;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
+
 use function SixShop\Core\throw_logic_exception;
 use function SixShop\Core\throw_logic_exception;
 
 
 class IDCardClient
 class IDCardClient
 {
 {
-
     private const string GATEWAY = 'https://idcard.market.alicloudapi.com/';
     private const string GATEWAY = 'https://idcard.market.alicloudapi.com/';
 
 
     private HttpClientInterface $httpClient;
     private HttpClientInterface $httpClient;
@@ -45,4 +47,4 @@ class IDCardClient
             throw_logic_exception($this->errorMesageMap[$result['resp']['code']] ?? $result['resp']['desc']);
             throw_logic_exception($this->errorMesageMap[$result['resp']['code']] ?? $result['resp']['desc']);
         }
         }
     }
     }
-}
+}

+ 4 - 1
test/IDCardClientTest.php

@@ -1,6 +1,9 @@
 <?php
 <?php
+
 declare(strict_types=1);
 declare(strict_types=1);
+
 namespace SixShop\AliyunIDCard;
 namespace SixShop\AliyunIDCard;
+
 use PHPUnit\Framework\TestCase;
 use PHPUnit\Framework\TestCase;
 
 
 class IDCardClientTest extends TestCase
 class IDCardClientTest extends TestCase
@@ -19,4 +22,4 @@ class IDCardClientTest extends TestCase
         $this->assertArrayHasKey('sex', $result);
         $this->assertArrayHasKey('sex', $result);
         $this->assertArrayHasKey('address', $result);
         $this->assertArrayHasKey('address', $result);
     }
     }
-}
+}