Skip to content

Commit

Permalink
Format and build
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjmead committed Nov 10, 2024
1 parent 1931a83 commit fa362a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Commands/Restore.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function handle(): void
$backups = \App\Domain\Backup::get_backups();
$length_of_longest_name = $backups->map(fn (\App\Domain\Backup $backup) => Str::length($backup->name()))->sortDesc()->first();
// TODO Create a BackupOption
$options = $backups->mapWithKeys(function (\App\Domain\Backup $backup, int $index) use ($length_of_longest_name) {
$options = $backups->mapWithKeys(function (\App\Domain\Backup $backup, int $index) use ($length_of_longest_name) {
return [
$backup->path() => Str::padRight($backup->name(), $length_of_longest_name) . ' (' . $backup->created_at()->format('Y-m-d g:i a') . ')',
];
Expand Down
4 changes: 2 additions & 2 deletions app/Domain/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public function created_at(): Carbon
public static function get_backup(string $backup_name): ?self
{
$backups_path = getenv('HOME') . '/.wpsites/backups/';
$backup_path = collect(File::directories($backups_path))->first(function (string $directory) use ($backup_name) {
$backup_path = collect(File::directories($backups_path))->first(function (string $directory) use ($backup_name) {
return basename($directory) === $backup_name;

});

if($backup_path === null) {
if ($backup_path === null) {
return null;
}

Expand Down
Binary file modified builds/wpsites
Binary file not shown.

0 comments on commit fa362a2

Please sign in to comment.