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

SwapSolverService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExchangesMatches() 0 4 1
A __construct() 0 3 1
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