作者 竞泽

去掉闭包调用

... ... @@ -3,21 +3,17 @@
namespace Lackoxygen\Customs;
use Lackoxygen\Customs\Request\PayExInfo;
use Lackoxygen\Customs\Utils\Trigger;
class Customs
{
/**
* @param callable $func
* @param PayExInfo $payExInfo
*
* @return string
* @throws Exception\Exception
*/
public function report(callable $func)
public function report(PayExInfo $payExInfo)
{
$payExInfo = PayExInfo::make();
Trigger::closure($func, $payExInfo);
return Client::request($payExInfo);
}
}
... ...
... ... @@ -4,11 +4,12 @@ namespace Lackoxygen\Customs\Facade;
use Illuminate\Support\Facades\Facade;
use Lackoxygen\Customs\Customs;
use Lackoxygen\Customs\Request\PayExInfo;
/**
* Class CustomsFacade
*
* @method static report(callable $func)
* @method static report(PayExInfo $exInfo)
*/
class CustomsFacade extends Facade
{
... ...