Skip to content

Commit a6e3d86

Browse files
thettlergithub-actions[bot]
authored andcommitted
Fix styling
1 parent a3c521c commit a6e3d86

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Concerns/UsesInputValidation.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ protected function validate(Collection $collection): Collection
3535
$messages
3636
);
3737

38-
if (!$validator->fails()) {
38+
if (! $validator->fails()) {
3939
return $collection;
4040
}
4141

42-
$inputErrors = $collection->mapWithKeys(fn(InputReflection $reflection) => [
42+
$inputErrors = $collection->mapWithKeys(fn (InputReflection $reflection) => [
4343
$reflection->getName() => new InputErrorData(
4444
key: $reflection->getName(),
4545
choices: $choices[$reflection->getName()] ?? [],
@@ -56,7 +56,7 @@ protected function validate(Collection $collection): Collection
5656
*/
5757
protected function extractValidationData(Collection $collection): array
5858
{
59-
return $collection->reduce(fn(array $carry, InputReflection $reflection) => [
59+
return $collection->reduce(fn (array $carry, InputReflection $reflection) => [
6060
'values' => [...$carry['values'], ...$this->extractInputValues($reflection)],
6161
'rules' => [...$carry['rules'], ...$this->extractInputRules($reflection)],
6262
'messages' => [...$carry['messages'], ...$this->extractValidationMessages($reflection)],
@@ -71,12 +71,12 @@ protected function extractValidationData(Collection $collection): array
7171

7272
protected function extractValidationMessages(InputReflection $reflection): array
7373
{
74-
if (!$reflection->getValidationMessage()) {
74+
if (! $reflection->getValidationMessage()) {
7575
return [];
7676
}
7777

7878
return collect($reflection->getValidationMessage())
79-
->mapWithKeys(fn(string $value, string $key) => ["{$reflection->getName()}.{$key}" => $value])
79+
->mapWithKeys(fn (string $value, string $key) => ["{$reflection->getName()}.{$key}" => $value])
8080
->all();
8181
}
8282

@@ -98,7 +98,7 @@ protected function extractInputRules(
9898
): array {
9999
$rules = [];
100100

101-
if ($this->hasAutoAskEnabled($reflection) && !$reflection->isArray()) {
101+
if ($this->hasAutoAskEnabled($reflection) && ! $reflection->isArray()) {
102102
$rules[] = 'required';
103103
}
104104

0 commit comments

Comments
 (0)