@@ -7,12 +7,8 @@ |
||
| 7 | 7 | use Http\Client\Exception\TransferException; |
| 8 | 8 | use Http\Client\HttpClient; |
| 9 | 9 | use Http\Client\Plugin\ErrorPlugin; |
| 10 | -use Http\Client\Plugin\LoggerPlugin; |
|
| 11 | 10 | use Http\Client\Plugin\PluginClient; |
| 12 | -use Http\Discovery\HttpClientDiscovery; |
|
| 13 | -use Http\Discovery\MessageFactoryDiscovery; |
|
| 14 | 11 | use Http\Message\MessageFactory; |
| 15 | -use Psr\Log\LoggerInterface; |
|
| 16 | 12 | |
| 17 | 13 | class RequestManager |
| 18 | 14 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Happyr\TranslationBundle\Service; |
| 4 | 4 | |
| 5 | -use Happyr\TranslationBundle\Exception\HappyrTranslationException; |
|
| 6 | 5 | use Happyr\TranslationBundle\Exception\HttpException; |
| 7 | 6 | use Happyr\TranslationBundle\Http\RequestManager; |
| 8 | 7 | use Happyr\TranslationBundle\Model\Message; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $query = array_merge($extraQuery, ['key' => $key]); |
| 80 | - $url = self::BASE_URL . $resource . '?' . http_build_query($query); |
|
| 80 | + $url = self::BASE_URL.$resource.'?'.http_build_query($query); |
|
| 81 | 81 | |
| 82 | 82 | return $this->requestManager->send($method, $url, $body, $headers); |
| 83 | 83 | } |
@@ -196,10 +196,10 @@ discard block |
||
| 196 | 196 | $notes = ''; |
| 197 | 197 | foreach ($message->getParameters() as $key => $value) { |
| 198 | 198 | if (!is_array($value)) { |
| 199 | - $notes .= 'Parameter: ' . $key . ' (i.e. : ' . $value . ")\n"; |
|
| 199 | + $notes .= 'Parameter: '.$key.' (i.e. : '.$value.")\n"; |
|
| 200 | 200 | } else { |
| 201 | 201 | foreach ($value as $k => $v) { |
| 202 | - $notes .= 'Parameter: ' . $k . ' (i.e. : ' . $v . ")\n"; |
|
| 202 | + $notes .= 'Parameter: '.$k.' (i.e. : '.$v.")\n"; |
|
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | } |
@@ -398,13 +398,13 @@ discard block |
||
| 398 | 398 | } |
| 399 | 399 | foreach ($subnode as $key => $value) { |
| 400 | 400 | if (is_array($value)) { |
| 401 | - $nodePath = $path ? $path . '.' . $key : $key; |
|
| 401 | + $nodePath = $path ? $path.'.'.$key : $key; |
|
| 402 | 402 | $this->flatten($messages, $value, $nodePath); |
| 403 | 403 | if (null === $path) { |
| 404 | 404 | unset($messages[$key]); |
| 405 | 405 | } |
| 406 | 406 | } elseif (null !== $path) { |
| 407 | - $messages[$path . '.' . $key] = $value; |
|
| 407 | + $messages[$path.'.'.$key] = $value; |
|
| 408 | 408 | } |
| 409 | 409 | } |
| 410 | 410 | } |