@@ -27,7 +27,7 @@ |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
30 | - * @param $method |
|
30 | + * @param string $method |
|
31 | 31 | * @param array $parameters |
32 | 32 | * @return mixed |
33 | 33 | * @throws ApiException |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $backoff = new ExponentialBackoff(5); |
40 | 40 | |
41 | 41 | try { |
42 | - $response = $backoff->execute(function () use ($method, $parameters) { |
|
42 | + $response = $backoff->execute(function() use ($method, $parameters) { |
|
43 | 43 | return $this->statClient->performQuery($method, $parameters); |
44 | 44 | }); |
45 | 45 | } catch (ClientException $e) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | protected function checkMaximumDateRange(Carbon $fromDate, Carbon $toDate, $maxDays = 31) |
64 | 64 | { |
65 | 65 | if ($fromDate->diffInDays($toDate) > $maxDays) { |
66 | - throw ApiException::resultError('The maximum date range between from_date and to_date is '.$maxDays.' days.'); |
|
66 | + throw ApiException::resultError('The maximum date range between from_date and to_date is ' . $maxDays . ' days.'); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 |
@@ -3,12 +3,12 @@ |
||
3 | 3 | namespace SchulzeFelix\Stat\Api; |
4 | 4 | |
5 | 5 | use Carbon\Carbon; |
6 | -use SchulzeFelix\Stat\StatClient; |
|
7 | 6 | use GuzzleHttp\Exception\ClientException; |
8 | -use SchulzeFelix\Stat\ExponentialBackoff; |
|
9 | 7 | use SchulzeFelix\Stat\Exceptions\ApiException; |
10 | -use SchulzeFelix\Stat\Objects\StatRankDistribution; |
|
8 | +use SchulzeFelix\Stat\ExponentialBackoff; |
|
11 | 9 | use SchulzeFelix\Stat\Objects\StatEngineRankDistribution; |
10 | +use SchulzeFelix\Stat\Objects\StatRankDistribution; |
|
11 | +use SchulzeFelix\Stat\StatClient; |
|
12 | 12 | |
13 | 13 | class BaseStat |
14 | 14 | { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | $this->retries = $retries !== null ? (int) $retries : 3; |
34 | 34 | $this->retryFunction = $retryFunction; |
35 | - $this->delayFunction = function ($delay) { |
|
35 | + $this->delayFunction = function($delay) { |
|
36 | 36 | usleep($delay); |
37 | 37 | }; |
38 | 38 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return call_user_func_array($function, $arguments); |
57 | 57 | } catch (\Exception $exception) { |
58 | 58 | if ($this->retryFunction) { |
59 | - if (! call_user_func($this->retryFunction, $exception)) { |
|
59 | + if (!call_user_func($this->retryFunction, $exception)) { |
|
60 | 60 | throw $exception; |
61 | 61 | } |
62 | 62 | } |
@@ -4,13 +4,13 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Support\Collection; |
6 | 6 | use SchulzeFelix\Stat\Objects\StatBill; |
7 | -use SchulzeFelix\Stat\Objects\StatSite; |
|
8 | -use SchulzeFelix\Stat\Objects\StatSubAccount; |
|
9 | -use SchulzeFelix\Stat\Objects\StatBillSummary; |
|
10 | -use SchulzeFelix\Stat\Objects\StatBillServices; |
|
11 | 7 | use SchulzeFelix\Stat\Objects\StatBillKeywordType; |
12 | 8 | use SchulzeFelix\Stat\Objects\StatBillKeywordTypes; |
13 | 9 | use SchulzeFelix\Stat\Objects\StatBillOptionalServiceType; |
10 | +use SchulzeFelix\Stat\Objects\StatBillServices; |
|
11 | +use SchulzeFelix\Stat\Objects\StatBillSummary; |
|
12 | +use SchulzeFelix\Stat\Objects\StatSite; |
|
13 | +use SchulzeFelix\Stat\Objects\StatSubAccount; |
|
14 | 14 | |
15 | 15 | class StatBilling extends BaseStat |
16 | 16 | { |