ReviewOS

also looking at this

meemalabs/laravel-text-to-speech

Support laravel 9

#32
Merged luigel wants to merge support-laravel-9 into main
17 files +83 -61
src/Traits/Storable.phpmodified+9-14
Changes to src/Traits/Storable.php
@@ -24,8 +24,7 @@ trait Storable
2424 /**
2525 * Set where to store the converted file.
2626 *
27 * @param string $disk
28 *
27 * @param string $disk
2928 * @return $this
3029 */
3130 public function disk(string $disk)
@@ -38,8 +37,7 @@ trait Storable
3837 /**
3938 * Set path to where to store the converted file.
4039 *
41 * @param string $path
42 *
40 * @param string $path
4341 * @return $this
4442 */
4543 public function saveTo(string $path)
@@ -52,9 +50,8 @@ trait Storable
5250 /**
5351 * Execute the store.
5452 *
55 * @param string $text
56 * @param mixed $resultContent
57 *
53 * @param string $text
54 * @param mixed $resultContent
5855 * @return string
5956 */
6057 protected function store($text, $resultContent)
@@ -63,7 +60,7 @@ trait Storable
6360
6461 $storage = Storage::disk($this->disk ?: config('tts.disk'));
6562
66 $storage->put($this->path, $resultContent);
63 $storage->put($this->path, $resultContent ?? '');
6764
6865 return $this->path;
6966 }
@@ -71,9 +68,8 @@ trait Storable
7168 /**
7269 * Ensures the path not to be null if it is null it will set a default path.
7370 *
74 * @param string $text
75 * @param mixed $audio
76 *
71 * @param string $text
72 * @param mixed $audio
7773 * @return void
7874 */
7975 protected function ensurePathIsNotNull($text, $audio)
@@ -111,9 +107,8 @@ trait Storable
111107 /**
112108 * Get default filename returned in Filename Formatter.
113109 *
114 * @param string $text
115 * @param mixed $audio
116 *
110 * @param string $text
111 * @param mixed $audio
117112 * @return string
118113 */
119114 protected function getDefaultFilename($text, $audio)