From cc6ad2e6e148dd08218e169d0fc6f9fdba6887ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Thu, 22 Oct 2026 16:37:28 +0200 Subject: [PATCH] chore: phpcs fix --- app/Console/Commands/UserCreate.php | 36 ++++++++++----------- app/Http/Controllers/Bo/ClaimController.php | 4 +-- config/sentry.php | 2 -- phpcs.xml | 3 -- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/app/Console/Commands/UserCreate.php b/app/Console/Commands/UserCreate.php index d656d86..05f86e3 100644 --- a/app/Console/Commands/UserCreate.php +++ b/app/Console/Commands/UserCreate.php @@ -31,14 +31,14 @@ class UserCreate extends Command * * @var string|null */ - protected $first_name; + protected $firstName; /** * The last name of the new user. * * @var string|null */ - protected $last_name; + protected $lastName; /** * The email of the new user. @@ -61,10 +61,10 @@ class UserCreate extends Command */ public function handle(): void { - $this->first_name = null; + $this->firstName = null; $this->addFirstName(); - $this->last_name = null; + $this->lastName = null; $this->addLastName(); $this->email = null; @@ -74,8 +74,8 @@ class UserCreate extends Command $this->addRole(); $user = new User([ - 'first_name' => $this->first_name, - 'last_name' => $this->last_name, + 'first_name' => $this->firstName, + 'last_name' => $this->lastName, 'email' => $this->email, 'role' => $this->role, 'published' => true, @@ -93,22 +93,22 @@ class UserCreate extends Command */ private function addFirstName(): void { - while (is_null($this->first_name)) { + while (is_null($this->firstName)) { try { $tmp = $this->ask('Type the wanted user first name', 'Admin'); $validator = Validator::make(['first_name' => $tmp], [ 'first_name' => 'required|min:3|max:255' ]); $validator->validate(); - $this->first_name = $tmp; + $this->firstName = $tmp; } catch (ValidationException $e) { $this->error(sprintf( 'Please provide a valid first name %s', \implode(',', collect($e->errors())->flatten()->all()) )); continue; - } //end try - }; //end while + } + } } /** @@ -118,22 +118,22 @@ class UserCreate extends Command */ private function addLastName(): void { - while (is_null($this->last_name)) { + while (is_null($this->lastName)) { try { $tmp = $this->ask('Type the wanted user last name', 'Saïtama'); $validator = Validator::make(['last_name' => $tmp], [ 'last_name' => 'required|min:3|max:255' ]); $validator->validate(); - $this->last_name = $tmp; + $this->lastName = $tmp; } catch (ValidationException $e) { $this->error(sprintf( 'Please provide a valid last_name %s', \implode(',', collect($e->errors())->flatten()->all()) )); continue; - } //end try - }; //end while + } + } } /** @@ -157,8 +157,8 @@ class UserCreate extends Command \implode(',', collect($e->errors())->flatten()->all()) )); continue; - } //end try - }; //end while + } + } } /** @@ -199,7 +199,7 @@ class UserCreate extends Command \implode(',', collect($e->errors())->flatten()->all()) )); continue; - } //end try - }; //end while + } + } } } diff --git a/app/Http/Controllers/Bo/ClaimController.php b/app/Http/Controllers/Bo/ClaimController.php index 516b953..8a7ea9e 100644 --- a/app/Http/Controllers/Bo/ClaimController.php +++ b/app/Http/Controllers/Bo/ClaimController.php @@ -220,7 +220,7 @@ class ClaimController extends Controller // Return conversation. $claimMessageModels = ClaimMessage::getAllModelsFromClaim($claim->getKey()); return response()->json($claimMessageModels); - } //end if + } return response()->json([], 500); }); } @@ -293,6 +293,6 @@ class ClaimController extends Controller return $pdf->download('export.pdf'); } return $this->returnExportZip($format, $claims, $pdf->output()); - }; //end if + } } } diff --git a/config/sentry.php b/config/sentry.php index 2e47564..7ecd5b4 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -51,10 +51,8 @@ return [ 'missing_routes' => false, ], - // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii. 'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false), - // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate. 'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float) env('SENTRY_TRACES_SAMPLE_RATE'), 'before_send' => [\App\Lib\Helpers\ExceptionsHelper::class, 'sentryEventHandler'], diff --git a/phpcs.xml b/phpcs.xml index 9cca483..06cc447 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -113,9 +113,6 @@ - - -