@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * Get service headers |
| 48 | - * @return array |
|
| 48 | + * @return string[] |
|
| 49 | 49 | */ |
| 50 | 50 | public function getHeaders() |
| 51 | 51 | { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $headers = [ |
| 39 | 39 | 'Content-Type: application/json', |
| 40 | 40 | 'Host: tts.eu-west-1.ivonacloud.com', |
| 41 | - 'User-Agent: ' . $this->getOptions()->getUserAgent() |
|
| 41 | + 'User-Agent: '.$this->getOptions()->getUserAgent() |
|
| 42 | 42 | ]; |
| 43 | 43 | |
| 44 | 44 | return array_merge( |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function createPayload() |
| 55 | 55 | { |
| 56 | - $payloadArray = (object)array(); |
|
| 56 | + $payloadArray = (object) array(); |
|
| 57 | 57 | $payloadArray->Input['Data'] = $this->getQueryText(); |
| 58 | 58 | $payloadArray->Input['Type'] = 'text/plain'; |
| 59 | 59 | |
| 60 | 60 | $payloadArray->OutputFormat['Codec'] = $this->getOptions()->getOutputFormatCodec(); |
| 61 | - $payloadArray->OutputFormat['SampleRate'] = (int)$this->getOptions()->getOutputSampleRate(); |
|
| 61 | + $payloadArray->OutputFormat['SampleRate'] = (int) $this->getOptions()->getOutputSampleRate(); |
|
| 62 | 62 | $payloadArray->Voice['Language'] = $this->getOptions()->getLanguage(); |
| 63 | 63 | $payloadArray->Voice['Name'] = $this->getOptions()->getVoice(); |
| 64 | 64 | $payloadArray->Parameters['Rate'] = $this->getOptions()->getParametersRate(); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function getServiceUrl() |
| 95 | 95 | { |
| 96 | - return $this->serviceUrl . '/' . self::SERVICE_TYPE_SPEECH; |
|
| 96 | + return $this->serviceUrl.'/'.self::SERVICE_TYPE_SPEECH; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $reflection = new \ReflectionObject($this); |
| 108 | 108 | $constants = $reflection->getConstants(); |
| 109 | 109 | if (!in_array($serviceType, $constants)) { |
| 110 | - throw new RuntimeException('The type of service does not support: ' . $serviceType); |
|
| 110 | + throw new RuntimeException('The type of service does not support: '.$serviceType); |
|
| 111 | 111 | } |
| 112 | 112 | return $serviceType; |
| 113 | 113 | } |