chore: phpcs fix
This commit is contained in:
parent
ea1d6c6bba
commit
cc6ad2e6e1
4 changed files with 20 additions and 25 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'],
|
||||
|
|
|
|||
|
|
@ -113,9 +113,6 @@
|
|||
<rule ref="Squiz.Commenting.InlineComment">
|
||||
<exclude name="Squiz.Commenting.InlineComment.DocBlock" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.LongConditionClosingComment">
|
||||
<exclude name="Squiz.Commenting.LongConditionClosingComment.SpacingBefore" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.PostStatementComment"/>
|
||||
<rule ref="Squiz.Commenting.VariableComment"/>
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue