66use App \Models \SslCertificate ;
77use App \Models \StandaloneDragonfly ;
88use Lorisleiva \Actions \Concerns \AsAction ;
9+ use Spatie \Activitylog \Contracts \Activity ;
910use Symfony \Component \Yaml \Yaml ;
1011
1112class StartDragonfly
@@ -20,7 +21,7 @@ class StartDragonfly
2021
2122 private ?SslCertificate $ ssl_certificate = null ;
2223
23- public function handle (StandaloneDragonfly $ database )
24+ public function handle (StandaloneDragonfly $ database ): ? Activity
2425 {
2526 $ this ->database = $ database ;
2627
@@ -65,7 +66,7 @@ public function handle(StandaloneDragonfly $database)
6566 if (! $ caCert ) {
6667 $ this ->dispatch ('error ' , 'No CA certificate found for this database. Please generate a CA certificate for this server in the server/advanced page. ' );
6768
68- return ;
69+ return null ;
6970 }
7071
7172 $ this ->ssl_certificate = $ this ->database ->sslCertificates ()->first ();
@@ -217,7 +218,10 @@ private function buildStartCommand(): string
217218 return $ command ;
218219 }
219220
220- private function generate_local_persistent_volumes ()
221+ /**
222+ * @return array<int, string>
223+ */
224+ private function generate_local_persistent_volumes (): array
221225 {
222226 $ local_persistent_volumes = [];
223227 foreach ($ this ->database ->persistentStorages as $ persistentStorage ) {
@@ -232,7 +236,10 @@ private function generate_local_persistent_volumes()
232236 return $ local_persistent_volumes ;
233237 }
234238
235- private function generate_local_persistent_volumes_only_volume_names ()
239+ /**
240+ * @return array<string, array<string, bool|string>>
241+ */
242+ private function generate_local_persistent_volumes_only_volume_names (): array
236243 {
237244 $ local_persistent_volumes_names = [];
238245 foreach ($ this ->database ->persistentStorages as $ persistentStorage ) {
@@ -249,7 +256,10 @@ private function generate_local_persistent_volumes_only_volume_names()
249256 return $ local_persistent_volumes_names ;
250257 }
251258
252- private function generate_environment_variables ()
259+ /**
260+ * @return array<int, string>
261+ */
262+ private function generate_environment_variables (): array
253263 {
254264 $ environment_variables = collect ();
255265 foreach ($ this ->database ->runtime_environment_variables as $ env ) {
0 commit comments