作者 竞泽

去掉闭包调用

@@ -3,21 +3,17 @@ @@ -3,21 +3,17 @@
3 namespace Lackoxygen\Customs; 3 namespace Lackoxygen\Customs;
4 4
5 use Lackoxygen\Customs\Request\PayExInfo; 5 use Lackoxygen\Customs\Request\PayExInfo;
6 -use Lackoxygen\Customs\Utils\Trigger;  
7 6
8 class Customs 7 class Customs
9 { 8 {
10 /** 9 /**
11 - * @param callable $func 10 + * @param PayExInfo $payExInfo
12 * 11 *
13 * @return string 12 * @return string
14 * @throws Exception\Exception 13 * @throws Exception\Exception
15 */ 14 */
16 - public function report(callable $func) 15 + public function report(PayExInfo $payExInfo)
17 { 16 {
18 - $payExInfo = PayExInfo::make();  
19 - Trigger::closure($func, $payExInfo);  
20 -  
21 return Client::request($payExInfo); 17 return Client::request($payExInfo);
22 } 18 }
23 } 19 }
@@ -4,11 +4,12 @@ namespace Lackoxygen\Customs\Facade; @@ -4,11 +4,12 @@ namespace Lackoxygen\Customs\Facade;
4 4
5 use Illuminate\Support\Facades\Facade; 5 use Illuminate\Support\Facades\Facade;
6 use Lackoxygen\Customs\Customs; 6 use Lackoxygen\Customs\Customs;
  7 +use Lackoxygen\Customs\Request\PayExInfo;
7 8
8 /** 9 /**
9 * Class CustomsFacade 10 * Class CustomsFacade
10 * 11 *
11 - * @method static report(callable $func) 12 + * @method static report(PayExInfo $exInfo)
12 */ 13 */
13 class CustomsFacade extends Facade 14 class CustomsFacade extends Facade
14 { 15 {