YetiForceCompany/YetiForceCRM

View on GitHub
modules/OSSMailScanner/ConfigTemplate.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Define a constant instead of duplicating this literal "\App\Validator::bool" 5 times.
Open

        'validation' => '\App\Validator::bool',

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "default" 9 times.
Open

        'default' => false,

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "\App\Purifier::bool" 5 times.
Open

        'sanitization' => '\App\Purifier::bool'

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "validation" 6 times.
Open

        'validation' => '\App\Validator::bool',

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "sanitization" 5 times.
Open

        'sanitization' => '\App\Purifier::bool'

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "description" 9 times.
Open

        'description' => "Add only one mail for multiple recipients.\n@var bool",

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Spaces must be used to indent lines; tabs are not allowed
Open

        'validation' => '\App\Validator::bool',

Spaces must be used to indent lines; tabs are not allowed
Open

        'validation' => '\App\Validator::bool',

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => "Folder for documents with graphic files\n@var string",

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Line exceeds 120 characters; contains 126 characters
Open

        'description' => 'What status should be set when a ticket is closed, but a new mail regarding the ticket is received.'

Spaces must be used to indent lines; tabs are not allowed
Open

    'mailBodyGraphicDocumentsFolder' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => 'Search prefix in body, type: boolean',

Spaces must be used to indent lines; tabs are not allowed
Open

        'validation' => '\App\Validator::bool',

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => 'What status should be set when a new mail is received regarding a ticket, whose status is awaiting response.'

Spaces must be used to indent lines; tabs are not allowed
Open

    'attachHtmlAndTxtToMessageBody' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => false,

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => true,

Spaces must be used to indent lines; tabs are not allowed
Open

    'searchPrefixInBody' => [

Spaces must be used to indent lines; tabs are not allowed
Open

    'helpdeskCreateDefaultStatus' => [

Spaces must be used to indent lines; tabs are not allowed
Open

    'helpdeskBindNextWaitForResponseStatus' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => "Attach the content of HTML and TXT files to the email message body.\nThe content of all attachments will be added at the very end of the email body.\n@var bool",

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Spaces must be used to indent lines; tabs are not allowed
Open

        'validation' => '\App\Validator::bool',

Spaces must be used to indent lines; tabs are not allowed
Open

    'helpdeskBindOpenStatus' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => 'Answered',

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => "Do you want to attach graphic files from the email body as documents: From URL src=https://www.example.domain/image_file ?\n@var bool When the option is disabled, graphic files aren't saved in the CRM",

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => 'Answered',

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => false,

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => "Add only one mail for multiple recipients.\n@var bool",

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => true,

Spaces must be used to indent lines; tabs are not allowed
Open

        'sanitization' => '\App\Purifier::bool'

Spaces must be used to indent lines; tabs are not allowed
Open

        'sanitization' => '\App\Purifier::bool'

Spaces must be used to indent lines; tabs are not allowed
Open

    'helpdeskCreateWithoutNoRelation' => [

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Line exceeds 120 characters; contains 187 characters
Open

        'description' => "Attach the content of HTML and TXT files to the email message body.\nThe content of all attachments will be added at the very end of the email body.\n@var bool",

Spaces must be used to indent lines; tabs are not allowed
Open

        'validation' => '\App\Validator::alnum'

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => 'Create ticket when contact and account does not exist, type: boolean',

Spaces must be used to indent lines; tabs are not allowed
Open

    ],

Line exceeds 120 characters; contains 228 characters
Open

        'description' => "Do you want to attach graphic files from the email body as documents: From URL src=https://www.example.domain/image_file ?\n@var bool When the option is disabled, graphic files aren't saved in the CRM",

Spaces must be used to indent lines; tabs are not allowed
Open

        'sanitization' => '\App\Purifier::bool'

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => false,

Spaces must be used to indent lines; tabs are not allowed
Open

        'validation' => '\App\Validator::bool',

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => 'What status should be set when a ticket is closed, but a new mail regarding the ticket is received.'

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => 'T2',

Spaces must be used to indent lines; tabs are not allowed
Open

    'attachMailBodyGraphicUrl' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        'default' => 'Open',

Line exceeds 120 characters; contains 135 characters
Open

        'description' => 'What status should be set when a new mail is received regarding a ticket, whose status is awaiting response.'

Spaces must be used to indent lines; tabs are not allowed
Open

    'ONE_MAIL_FOR_MULTIPLE_RECIPIENTS' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        'sanitization' => '\App\Purifier::bool'

Spaces must be used to indent lines; tabs are not allowed
Open

        'sanitization' => '\App\Purifier::bool'

Spaces must be used to indent lines; tabs are not allowed
Open

        'description' => 'What status should be set when a ticket is created.'

There are no issues that match your filters.

Category
Status