@@ -86,7 +86,7 @@ |
||
| 86 | 86 | |
| 87 | 87 | public function updateFromSalesforceRefresh(array $salesforceToken) |
| 88 | 88 | { |
| 89 | - $this->dateIssued = Carbon::createFromTimestamp((int) ($salesforceToken[TokenFields::ISSUED_AT] / 1000)); |
|
| 89 | + $this->dateIssued = Carbon::createFromTimestamp((int)($salesforceToken[TokenFields::ISSUED_AT] / 1000)); |
|
| 90 | 90 | |
| 91 | 91 | $this->dateExpires = $this->dateIssued->copy()->addHour()->subMinutes(5); |
| 92 | 92 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function createFromSalesforceResponse(array $salesforceToken) |
| 61 | 61 | { |
| 62 | - $dateIssued = Carbon::createFromTimestamp((int) ($salesforceToken[TokenFields::ISSUED_AT] / 1000)); |
|
| 62 | + $dateIssued = Carbon::createFromTimestamp((int)($salesforceToken[TokenFields::ISSUED_AT] / 1000)); |
|
| 63 | 63 | |
| 64 | 64 | $dateExpires = $dateIssued->copy()->addHour()->subMinutes(5); |
| 65 | 65 | |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Akeneo\SalesForce\Authentification\AccessTokenGenerator; |
| 7 | 7 | use Akeneo\SalesForce\Exception\AuthenticationException; |
| 8 | 8 | use Akeneo\SalesForce\Exception\DuplicateDetectedException; |
| 9 | -use Akeneo\SalesForce\Search\ParameterizedSearchBuilder; |
|
| 10 | 9 | use GuzzleHttp\Client as GuzzleClient; |
| 11 | 10 | use Akeneo\SalesForce\Exception\RequestException; |
| 12 | 11 | |
@@ -87,9 +87,8 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | public function search($query = null, $nextUrl = null) |
| 89 | 89 | { |
| 90 | - $url = !empty($nextUrl) ? |
|
| 91 | - sprintf('%s/%s', $this->getBaseUrl(), $nextUrl) : |
|
| 92 | - sprintf( |
|
| 90 | + $url = ! empty($nextUrl) ? |
|
| 91 | + sprintf('%s/%s', $this->getBaseUrl(), $nextUrl) : sprintf( |
|
| 93 | 92 | '%s%s/?q=%s', |
| 94 | 93 | $this->getBaseUrl(), |
| 95 | 94 | static::BASE_QUERY_URL, |
@@ -102,9 +101,9 @@ discard block |
||
| 102 | 101 | |
| 103 | 102 | $results = $data['records']; // or $data['searchRecords'] |
| 104 | 103 | |
| 105 | - if (!$data['done']) { |
|
| 104 | + if ( ! $data['done']) { |
|
| 106 | 105 | $more_results = $this->search(null, substr($data['nextRecordsUrl'], 1)); |
| 107 | - if (!empty($more_results)) { |
|
| 106 | + if ( ! empty($more_results)) { |
|
| 108 | 107 | $results = array_merge($results, $more_results); |
| 109 | 108 | } |
| 110 | 109 | } |
@@ -146,7 +145,7 @@ discard block |
||
| 146 | 145 | |
| 147 | 146 | public function getDescribedObject(string $objectName) |
| 148 | 147 | { |
| 149 | - $url = sprintf( |
|
| 148 | + $url = sprintf( |
|
| 150 | 149 | '%s%s/%s/describe', |
| 151 | 150 | $this->getBaseUrl(), |
| 152 | 151 | static::BASE_API_URL, |
@@ -159,7 +158,7 @@ discard block |
||
| 159 | 158 | |
| 160 | 159 | public function findById($objectName, $objectId, array $fields = []) |
| 161 | 160 | { |
| 162 | - $url = sprintf( |
|
| 161 | + $url = sprintf( |
|
| 163 | 162 | '%s%s/%s/%s?fields=%s', |
| 164 | 163 | $this->getBaseUrl(), |
| 165 | 164 | static::BASE_API_URL, |
@@ -186,7 +185,7 @@ discard block |
||
| 186 | 185 | string $externalIdValue, |
| 187 | 186 | array $data = [] |
| 188 | 187 | ) { |
| 189 | - $url = sprintf( |
|
| 188 | + $url = sprintf( |
|
| 190 | 189 | '%s%s/%s/%s/%s', |
| 191 | 190 | $this->getBaseUrl(), |
| 192 | 191 | static::BASE_API_URL, |
@@ -201,7 +200,7 @@ discard block |
||
| 201 | 200 | |
| 202 | 201 | public function update($objectName, $objectId, $data = []) |
| 203 | 202 | { |
| 204 | - $url = sprintf( |
|
| 203 | + $url = sprintf( |
|
| 205 | 204 | '%s%s/%s/%s', |
| 206 | 205 | $this->getBaseUrl(), |
| 207 | 206 | static::BASE_API_URL, |
@@ -400,7 +399,7 @@ discard block |
||
| 400 | 399 | throw new DuplicateDetectedException($error, $e->getRequest()->getUri()); |
| 401 | 400 | } |
| 402 | 401 | |
| 403 | - throw new RequestException($e->getMessage(), (string) $e->getResponse()->getBody()); |
|
| 402 | + throw new RequestException($e->getMessage(), (string)$e->getResponse()->getBody()); |
|
| 404 | 403 | } |
| 405 | 404 | } |
| 406 | 405 | } |
@@ -126,7 +126,6 @@ |
||
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | - * @param string $condition |
|
| 130 | 129 | * |
| 131 | 130 | * @return QueryBuilder |
| 132 | 131 | */ |