Completed
Pull Request — develop (#16)
by
unknown
06:55
created

SwapSolverService::getExchangesMatches()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Judite\Services;
4
5
use GuzzleHttp\Client;
6
7
class SwapSolverService
8
{
9
    /**
10
     * The HTTP client.
11
     *
12
     * @var \GuzzleHttp\Client
13
     */
14
    protected $client;
15
16
    /**
17
     * Create a new SwapSolverService instance.
18
     *
19
     * @param \GuzzleHttp\Client $client
20
     */
21
    public function __construct(Client $client)
22
    {
23
        $this->client = $client;
24
    }
25
26
    /**
27
     * Get the possible matches for requested exchanges.
28
     * 
29
     * @param array $exchanges
30
     */
31
    public function getExchangesMatches($exchanges)
32
    {
33
        // form_params
34
        return $this->client->post('/', ['exchange_requests' => $exchanges]);
35
    }
36
}
37