2020use Cake \Event \EventListenerInterface ;
2121use DatabaseBackup \BackupTrait ;
2222use RuntimeException ;
23+ use Tools \Exceptionist ;
2324
2425/**
2526 * Represents a driver containing all methods to export/import database backups
@@ -187,7 +188,7 @@ final public function export(string $filename): bool
187188 }
188189
189190 exec ($ this ->_exportExecutableWithCompression ($ filename ), $ output , $ returnVar );
190- is_true_or_fail ($ returnVar === 0 , __d ('database_backup ' , 'Failed with exit code `{0}` ' , $ returnVar ));
191+ Exceptionist:: isTrue ($ returnVar === 0 , __d ('database_backup ' , 'Failed with exit code `{0}` ' , $ returnVar ));
191192
192193 $ this ->dispatchEvent ('Backup.afterExport ' );
193194
@@ -203,7 +204,7 @@ final public function export(string $filename): bool
203204 public function getBinary ($ name )
204205 {
205206 $ binary = Configure::read ('DatabaseBackup.binaries. ' . $ name );
206- is_true_or_fail ($ binary , sprintf ('Binary for `%s` could not be found. You have to set its path manually ' , $ name ), RuntimeException::class);
207+ Exceptionist:: isTrue ($ binary , sprintf ('Binary for `%s` could not be found. You have to set its path manually ' , $ name ), RuntimeException::class);
207208
208209 return $ binary ;
209210 }
@@ -244,7 +245,7 @@ final public function import(string $filename): bool
244245 }
245246
246247 exec ($ this ->_importExecutableWithCompression ($ filename ), $ output , $ returnVar );
247- is_true_or_fail ($ returnVar === 0 , __d ('database_backup ' , 'Failed with exit code `{0}` ' , $ returnVar ));
248+ Exceptionist:: isTrue ($ returnVar === 0 , __d ('database_backup ' , 'Failed with exit code `{0}` ' , $ returnVar ));
248249
249250 $ this ->dispatchEvent ('Backup.afterImport ' );
250251
0 commit comments