Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
69 | 126 | protected function run($method, $endpoint, array $data = []) |
|
70 | { |
||
71 | 126 | if (!$this->branchId) { |
|
72 | 126 | $this->setBranch(1); |
|
73 | 126 | } |
|
74 | |||
75 | 126 | $request = new Request($this->client->getHandler()); |
|
76 | |||
77 | 126 | return $request->run($method, $this->client->makeUrl($endpoint), array_merge($data, [ |
|
78 | 'headers' => [ |
||
79 | 126 | 'X-Session-ID' => $this->client->getToken(), |
|
80 | 126 | ], |
|
81 | 126 | ])); |
|
82 | } |
||
83 | } |
||
84 |