| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class DNBRequestHandler |
||
| 10 | { |
||
| 11 | private $api_key; |
||
| 12 | private $customerId; |
||
| 13 | private $credentials; |
||
| 14 | |||
| 15 | protected $signer; |
||
| 16 | protected $token; |
||
| 17 | |||
| 18 | public function __construct(Credentials $credentials, $api_key, $customerId) |
||
| 19 | { |
||
| 20 | $this->api_key = $api_key; |
||
| 21 | $this->customerId = $customerId; |
||
| 22 | $this->credentials = $credentials; |
||
| 23 | |||
| 24 | $this->signer = new SignatureV4( |
||
| 25 | config('services.dnb.servcice') ?? 'execute-api', |
||
|
|
|||
| 26 | config('services.dnb.region') ?? 'eu-west-1' |
||
| 27 | ); |
||
| 28 | $this->token = new JwtToken($this->credentials, $this->api_key, $this->customerId); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function __invoke(callable $handler) |
||
| 42 | }; |
||
| 43 | } |
||
| 45 |