also looking at this
meemalabs/laravel-text-to-speech
Apply fixes from StyleCI
#31
15 files
+55
-58
formatting only · 8 hidden lines
| @@ -26,7 +26,7 @@ class PollyConverter implements Converter formatting only | ||
| 26 | 26 | /** |
| 27 | 27 | * Construct converter. |
| 28 | 28 | * |
| 29 | * @param PollyClient $client | |
| 29 | * @param PollyClient $client | |
| 30 | 30 | */ |
| 31 | 31 | public function __construct(PollyClient $client) |
| 32 | 32 | { |
| @@ -46,9 +46,8 @@ class PollyConverter implements Converter | ||
| 46 | 46 | /** |
| 47 | 47 | * Converts the text to speech. |
| 48 | 48 | * |
| 49 | * @param string $data | |
| 50 | * @param array|null $options | |
| 51 | * | |
| 49 | * @param string $data | |
| 50 | * @param array|null $options | |
| 52 | 51 | * @return string|array |
| 53 | 52 | */ |
| 54 | 53 | public function convert(string $data, array $options = null) |
| @@ -82,9 +81,8 @@ class PollyConverter implements Converter | ||
| 82 | 81 | /** |
| 83 | 82 | * Request to Amazon Polly to synthesize speech. |
| 84 | 83 | * |
| 85 | * @param string|array $text | |
| 86 | * @param array|null $options | |
| 87 | * | |
| 84 | * @param string|array $text | |
| 85 | * @param array|null $options | |
| 88 | 86 | * @return array|\Aws\Result |
| 89 | 87 | */ |
| 90 | 88 | protected function synthesizeSpeech($text, array $options = null) |
formatting only · 8 hidden lines
| @@ -137,7 +135,7 @@ class PollyConverter implements Converter formatting only | ||
| 137 | 135 | /** |
| 138 | 136 | * Checks the length of the text if more than 3000. |
| 139 | 137 | * |
| 140 | * @param string $text | |
| 138 | * @param string $text | |
| 141 | 139 | * @return bool |
| 142 | 140 | */ |
| 143 | 141 | protected function isTextAboveLimit(string $text) |
formatting only · 10 hidden lines
| @@ -148,8 +146,8 @@ class PollyConverter implements Converter formatting only | ||
| 148 | 146 | /** |
| 149 | 147 | * Chunk the given text into array. |
| 150 | 148 | * |
| 151 | * @param string $text | |
| 152 | * @param int $size | |
| 149 | * @param string $text | |
| 150 | * @param int $size | |
| 153 | 151 | * @return array |
| 154 | 152 | */ |
| 155 | 153 | protected function getChunkText(string $text, int $size = 2000) |
formatting only · 8 hidden lines
| @@ -160,7 +158,7 @@ class PollyConverter implements Converter formatting only | ||
| 160 | 158 | /** |
| 161 | 159 | * Get the text to speech voice ID. |
| 162 | 160 | * |
| 163 | * @param array $options | |
| 161 | * @param array $options | |
| 164 | 162 | * @return string |
| 165 | 163 | */ |
| 166 | 164 | protected function voice($options) |
formatting only · 8 hidden lines
| @@ -195,7 +193,7 @@ class PollyConverter implements Converter formatting only | ||
| 195 | 193 | /** |
| 196 | 194 | * Get the audio format. |
| 197 | 195 | * |
| 198 | * @param array $options | |
| 196 | * @param array $options | |
| 199 | 197 | * @return string |
| 200 | 198 | */ |
| 201 | 199 | protected function format($options) |
formatting only · 8 hidden lines
| @@ -212,7 +210,7 @@ class PollyConverter implements Converter formatting only | ||
| 212 | 210 | /** |
| 213 | 211 | * Get the engine. |
| 214 | 212 | * |
| 215 | * @param array $options | |
| 213 | * @param array $options | |
| 216 | 214 | * @return string |
| 217 | 215 | */ |
| 218 | 216 | protected function engine($options) |
formatting only · 8 hidden lines
| @@ -235,7 +233,7 @@ class PollyConverter implements Converter formatting only | ||
| 235 | 233 | /** |
| 236 | 234 | * Get the content of the result from AWS Polly. |
| 237 | 235 | * |
| 238 | * @param Result $result | |
| 236 | * @param Result $result | |
| 239 | 237 | * @return mixed |
| 240 | 238 | */ |
| 241 | 239 | protected function getResultContent($result) |
formatting only · 8 hidden lines
| @@ -256,7 +254,7 @@ class PollyConverter implements Converter formatting only | ||
| 256 | 254 | /** |
| 257 | 255 | * Format the given json string into an array. |
| 258 | 256 | * |
| 259 | * @param string $json | |
| 257 | * @param string $json | |
| 260 | 258 | * @return array |
| 261 | 259 | */ |
| 262 | 260 | protected function formatToArray($json) |