Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot authored and jiannei committed Oct 14, 2023
1 parent 375afba commit d0b5d66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Support/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected function formatMessage(int $code, string $message = ''): ?string
$localizationKey = join('.', [Config::get('response.locale', 'enums'), $code]);

return match (true) {
!$message && Lang::has($localizationKey) => Lang::get($localizationKey),
! $message && Lang::has($localizationKey) => Lang::get($localizationKey),
default => $message
};
}
Expand Down Expand Up @@ -272,7 +272,7 @@ protected function formatDataFields(array $data): array
$formatConfig = Config::get('response.format.config', []);

foreach ($formatConfig as $key => $config) {
if (!Arr::has($data, $key)) {
if (! Arr::has($data, $key)) {
continue;
}

Expand All @@ -285,7 +285,7 @@ protected function formatDataFields(array $data): array
$key = $alias;
}

if (!$show) {
if (! $show) {
$data = Arr::except($data, $key);
}
}
Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/SuccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,3 @@
expect(Response::success()->status())->toEqual(Format::data(null, '', 200)->response()->status())
->and(Response::success()->content())->toEqual(Format::data(null, '', 200)->response()->content());
});


0 comments on commit d0b5d66

Please sign in to comment.