-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.php
More file actions
27 lines (21 loc) · 805 Bytes
/
Copy pathapp.php
File metadata and controls
27 lines (21 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
declare(strict_types=1);
use CuteCode\Binlist\BinlistClient;
use CuteCode\Command;
use CuteCode\CommissionCalculator\CommissionCalculator;
use CuteCode\Processor;
use CuteCode\Exchanger\ApilayerExchanger;
use CuteCode\Exchanger\Client\ApiLayerClient;
use Dotenv\Dotenv;
use GuzzleHttp\Client;
require_once __DIR__ . '/vendor/autoload.php';
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
$guzzleClient = new Client();
$client = new ApiLayerClient($guzzleClient, $_ENV['APILAYER_APIKEY']);
$exchanger = new ApilayerExchanger($client);
$binlistClient = new BinlistClient($guzzleClient);
$commissionCalculator = new CommissionCalculator();
$processor = new Processor($exchanger, $binlistClient, $commissionCalculator);
$command = new Command($processor, $argv);
$command->execute();