also looking at this
meemalabs/laravel-text-to-speech
Apply fixes from StyleCI
#2
4 files
+17
-18
| @@ -1,16 +1,16 @@ | ||
| 1 | <?php | |
| 1 | <?php | |
| 2 | 2 | |
| 3 | 3 | namespace Cion\TextToSpeech\Contracts; |
| 4 | 4 | |
| 5 | 5 | interface Formatter |
| 6 | 6 | { |
| 7 | /** | |
| 8 | * Handles the filename of the audio. | |
| 9 | * | |
| 10 | * @param string $text The text source | |
| 11 | * @param mixed $audio The result audio content. | |
| 12 | * | |
| 13 | * @return string | |
| 14 | */ | |
| 7 | /** | |
| 8 | * Handles the filename of the audio. | |
| 9 | * | |
| 10 | * @param string $text The text source | |
| 11 | * @param mixed $audio The result audio content. | |
| 12 | * | |
| 13 | * @return string | |
| 14 | */ | |
| 15 | 15 | public function handle($text, $audio = null): string; |
| 16 | }⧵ | |
| 16 | } | |
| @@ -4,7 +4,6 @@ namespace Cion\TextToSpeech\Providers; | ||
| 4 | 4 | |
| 5 | 5 | use Cion\TextToSpeech\Contracts\Formatter; |
| 6 | 6 | use Cion\TextToSpeech\Facades\TextToSpeech; |
| 7 | use Cion\TextToSpeech\Formatters\DefaultFilenameFormatter; | |
| 8 | 7 | use Cion\TextToSpeech\TextToSpeechManager; |
| 9 | 8 | use Illuminate\Support\ServiceProvider; |
| 10 | 9 | |
| @@ -25,7 +25,7 @@ trait Storable | ||
| 25 | 25 | * Set where to store the converted file. |
| 26 | 26 | * |
| 27 | 27 | * @param string $disk |
| 28 | * | |
| 28 | * | |
| 29 | 29 | * @return $this |
| 30 | 30 | */ |
| 31 | 31 | public function disk(string $disk) |
| @@ -39,7 +39,7 @@ trait Storable | ||
| 39 | 39 | * Set path to where to store the converted file. |
| 40 | 40 | * |
| 41 | 41 | * @param string $path |
| 42 | * | |
| 42 | * | |
| 43 | 43 | * @return $this |
| 44 | 44 | */ |
| 45 | 45 | public function saveTo(string $path) |
| @@ -54,7 +54,7 @@ trait Storable | ||
| 54 | 54 | * |
| 55 | 55 | * @param string $text |
| 56 | 56 | * @param mixed $resultContent |
| 57 | * | |
| 57 | * | |
| 58 | 58 | * @return string |
| 59 | 59 | */ |
| 60 | 60 | protected function store($text, $resultContent) |
| @@ -73,12 +73,12 @@ trait Storable | ||
| 73 | 73 | * |
| 74 | 74 | * @param string $text |
| 75 | 75 | * @param mixed $audio |
| 76 | * | |
| 76 | * | |
| 77 | 77 | * @return void |
| 78 | 78 | */ |
| 79 | 79 | protected function ensurePathIsNotNull($text, $audio) |
| 80 | 80 | { |
| 81 | $filename = $this->path ?: $this->getDefaultPath() . '/' . $this->getDefaultFilename($text, $audio); | |
| 81 | $filename = $this->path ?: $this->getDefaultPath().'/'.$this->getDefaultFilename($text, $audio); | |
| 82 | 82 | |
| 83 | 83 | if (! $this->hasExtension($filename)) { |
| 84 | 84 | $filename .= '.'.$this->getExtension(); |
| @@ -113,7 +113,7 @@ trait Storable | ||
| 113 | 113 | * |
| 114 | 114 | * @param string $text |
| 115 | 115 | * @param mixed $audio |
| 116 | * | |
| 116 | * | |
| 117 | 117 | * @return string |
| 118 | 118 | */ |
| 119 | 119 | protected function getDefaultFilename($text, $audio) |