Skip to content

Commit

Permalink
Merge branch 'feature/refactor' of github.com:aerni/laravel-sync into…
Browse files Browse the repository at this point in the history
… feature/refactor
  • Loading branch information
aerni committed Mar 30, 2024
2 parents ebc450c + c9eb590 commit e5471c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions src/Commands/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

namespace Aerni\Sync\Commands;

use Aerni\Sync\SyncCommand;
use Illuminate\Support\Arr;
use Aerni\Sync\PathGenerator;
use Aerni\Sync\SyncCommand;
use Illuminate\Console\Command;
use Illuminate\Validation\Rule;
use Illuminate\Contracts\Console\PromptsForMissingInput;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use function Laravel\Prompts\select;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Symfony\Component\Console\Output\OutputInterface;
use Illuminate\Contracts\Console\PromptsForMissingInput;

use function Laravel\Prompts\select;

class BaseCommand extends Command implements PromptsForMissingInput
{
Expand Down Expand Up @@ -55,9 +56,9 @@ protected function validate(): void
'remote' => ['required', Rule::in(array_keys($this->remotes()))],
'recipe' => ['required', Rule::in(array_keys($this->recipes()))],
], [
'operation.in' => "The :attribute [:input] does not exists. Valid values are [push] or [pull].",
'remote.in' => "The :attribute [:input] does not exists. Please choose a valid remote.",
'recipe.in' => "The :attribute [:input] does not exists. Please choose a valid recipe.",
'operation.in' => 'The :attribute [:input] does not exists. Valid values are [push] or [pull].',
'remote.in' => 'The :attribute [:input] does not exists. Please choose a valid remote.',
'recipe.in' => 'The :attribute [:input] does not exists. Please choose a valid recipe.',
]);

if ($this->localPathEqualsRemotePath()) {
Expand Down
3 changes: 2 additions & 1 deletion src/Commands/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

namespace Aerni\Sync\Commands;

use function Laravel\Prompts\confirm;
use Illuminate\Support\Facades\Process;
use Symfony\Component\Console\Output\OutputInterface;

use function Laravel\Prompts\confirm;

class Sync extends BaseCommand
{
/**
Expand Down
3 changes: 1 addition & 2 deletions src/SyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace Aerni\Sync;

use Stringable;
use Aerni\Sync\PathGenerator;
use Illuminate\Contracts\Support\Arrayable;
use Stringable;

class SyncCommand implements Arrayable, Stringable
{
Expand Down

0 comments on commit e5471c4

Please sign in to comment.