Function postStatusSendinblue
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function postStatusSendinblue(Request $request)
{
if (env('MAIL_MAILER') == 'sendinblue') {
/*
Nota bene: qui arrivano tutte le segnalazioni webhook generate
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function postStatusScaleway
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function postStatusScaleway(Request $request)
{
if (env('MAIL_MAILER') == 'scaleway') {
$api_endpoint = 'https://api.scaleway.com/transactional-email/v1alpha1/regions/fr-par/webhooks';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method postStatusScaleway
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function postStatusScaleway(Request $request)
{
if (env('MAIL_MAILER') == 'scaleway') {
$api_endpoint = 'https://api.scaleway.com/transactional-email/v1alpha1/regions/fr-par/webhooks';
Function saveInstances
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function saveInstances($event, $email, $message)
{
$instances = get_instances();
$now = date('Y-m-d G:i:s');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"