1 | <?php namespace Yani\Coinbase; |
||
6 | class CoinbaseClient { |
||
7 | |||
8 | /** |
||
9 | * The coinbase API KEY |
||
10 | * |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $apiKey; |
||
14 | |||
15 | /** |
||
16 | * The coinbase API SECRET |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $apiSecret; |
||
21 | |||
22 | /** |
||
23 | * The Guzzle HTTP client |
||
24 | * |
||
25 | * @var \GuzzleHttp\Client |
||
26 | */ |
||
27 | protected $client = null; |
||
28 | |||
29 | /** |
||
30 | * The Coinbase endpoint |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $endpoint = ''; |
||
35 | |||
36 | /** |
||
37 | * Instantiate a new client |
||
38 | * |
||
39 | * @param \GuzzleHttp\Client $client |
||
40 | * @param string $apiKey |
||
41 | * @param string $apiSecret |
||
42 | * @param string $endpoint |
||
43 | */ |
||
44 | public function __construct(Guzzle $client, $apiKey, $apiSecret, $endpoint) |
||
51 | |||
52 | /** |
||
53 | * Create order with Coinbase API |
||
54 | * |
||
55 | * @param float $amount |
||
56 | * @param string $currency |
||
57 | * @param string $name |
||
58 | * @param string $description |
||
|
|||
59 | * @param array $metadata |
||
60 | * |
||
61 | * @return stdClass |
||
62 | */ |
||
63 | public function createCheckout($amount, $currency, $name, $data = []) |
||
100 | |||
101 | /** |
||
102 | * Return headers with coinbase signature |
||
103 | * |
||
104 | * @param int $timestamp |
||
105 | * @param string $method |
||
106 | * @param string $requestPath |
||
107 | * @param array $body |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | public function getHeaders($timestamp, $method, $requestPath, $body) |
||
122 | } |
||
123 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.