Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -36,8 +36,6 @@ class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
@@ -47,19 +45,19 @@ class AppServiceProvider extends ServiceProvider
'Cache-Control' => 'no-store',
];
$uuid = (string)request()->header('X-Trace-Id');
if ('' !== trim($uuid) && (preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)) === 1)) {
if ('' !== trim($uuid) && (1 === preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)))) {
$headers['X-Trace-Id'] = $uuid;
}
return response()
->json($value)
->withHeaders($headers);
->withHeaders($headers)
;
});
}
/**
* Register any application services.
*
* @return void
*/
public function register(): void
{