You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see the need for both the --file and --dump parameters - they are essentially doing the same.
Since the --file parameter expects an absolute path, the --dump (or --file) parameter could be removed and all files without paths could safely be assumed to be in the database folder.
Another benefit besides shortening the parameter list would be that it removes some of the logic and allows for the use of a match statement at
confusing, which could be either a temporary file copy of an imported dump or an existing dump file in the database dump folder, which requires an additional check at
I feel like all the logic in the handle() method could be refactored and maybe included in importDump(), or having additional methods like importDumpFromTempFile(), importLatestDump() or importDumpFromRemote(), to make the code more readable and move the logic.
The text was updated successfully, but these errors were encountered:
I don't see the need for both the
--file
and--dump
parameters - they are essentially doing the same.Since the
--file
parameter expects an absolute path, the--dump
(or--file
) parameter could be removed and all files without paths could safely be assumed to be in the database folder.Another benefit besides shortening the parameter list would be that it removes some of the logic and allows for the use of a match statement at
laravel-protector/src/Commands/ImportDump.php
Line 91 in e4e001f
Furthermore, I find the double use of
$localFilePath
atlaravel-protector/src/Commands/ImportDump.php
Line 105 in e4e001f
laravel-protector/src/Commands/ImportDump.php
Line 110 in e4e001f
I feel like all the logic in the
handle()
method could be refactored and maybe included inimportDump()
, or having additional methods likeimportDumpFromTempFile()
,importLatestDump()
orimportDumpFromRemote()
, to make the code more readable and move the logic.The text was updated successfully, but these errors were encountered: