diff --git a/src/Support/Format.php b/src/Support/Format.php index 825e06e..a5ba22e 100644 --- a/src/Support/Format.php +++ b/src/Support/Format.php @@ -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 }; } @@ -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; } @@ -285,7 +285,7 @@ protected function formatDataFields(array $data): array $key = $alias; } - if (!$show) { + if (! $show) { $data = Arr::except($data, $key); } } diff --git a/tests/Unit/SuccessTest.php b/tests/Unit/SuccessTest.php index ab321b9..a29fd27 100644 --- a/tests/Unit/SuccessTest.php +++ b/tests/Unit/SuccessTest.php @@ -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()); }); - -