Skip to content

Commit e5471c4

Browse files
committed
Merge branch 'feature/refactor' of github.com:aerni/laravel-sync into feature/refactor
2 parents ebc450c + c9eb590 commit e5471c4

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/Commands/BaseCommand.php

+9-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
namespace Aerni\Sync\Commands;
44

5-
use Aerni\Sync\SyncCommand;
6-
use Illuminate\Support\Arr;
75
use Aerni\Sync\PathGenerator;
6+
use Aerni\Sync\SyncCommand;
87
use Illuminate\Console\Command;
9-
use Illuminate\Validation\Rule;
8+
use Illuminate\Contracts\Console\PromptsForMissingInput;
9+
use Illuminate\Support\Arr;
1010
use Illuminate\Support\Collection;
11-
use function Laravel\Prompts\select;
1211
use Illuminate\Support\Facades\Validator;
12+
use Illuminate\Validation\Rule;
1313
use Symfony\Component\Console\Output\OutputInterface;
14-
use Illuminate\Contracts\Console\PromptsForMissingInput;
14+
15+
use function Laravel\Prompts\select;
1516

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

6364
if ($this->localPathEqualsRemotePath()) {

src/Commands/Sync.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
namespace Aerni\Sync\Commands;
44

5-
use function Laravel\Prompts\confirm;
65
use Illuminate\Support\Facades\Process;
76
use Symfony\Component\Console\Output\OutputInterface;
87

8+
use function Laravel\Prompts\confirm;
9+
910
class Sync extends BaseCommand
1011
{
1112
/**

src/SyncCommand.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
namespace Aerni\Sync;
44

5-
use Stringable;
6-
use Aerni\Sync\PathGenerator;
75
use Illuminate\Contracts\Support\Arrayable;
6+
use Stringable;
87

98
class SyncCommand implements Arrayable, Stringable
109
{

0 commit comments

Comments
 (0)