Define a constant instead of duplicating this literal "\App\Validator::bool" 5 times. Open
'validation' => '\App\Validator::bool',
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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'
- Read upRead up
- Exclude checks
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',
- Read upRead up
- Exclude checks
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'
- Read upRead up
- Exclude checks
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",
- Read upRead up
- Exclude checks
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',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'validation' => '\App\Validator::bool',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => "Folder for documents with graphic files\n@var string",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
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.'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'mailBodyGraphicDocumentsFolder' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => 'Search prefix in body, type: boolean',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'validation' => '\App\Validator::bool',
- Exclude checks
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.'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'attachHtmlAndTxtToMessageBody' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => true,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'searchPrefixInBody' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'helpdeskCreateDefaultStatus' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'helpdeskBindNextWaitForResponseStatus' => [
- Exclude checks
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",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'validation' => '\App\Validator::bool',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'helpdeskBindOpenStatus' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => 'Answered',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
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",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => 'Answered',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => "Add only one mail for multiple recipients.\n@var bool",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => true,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sanitization' => '\App\Purifier::bool'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sanitization' => '\App\Purifier::bool'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'helpdeskCreateWithoutNoRelation' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
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",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'validation' => '\App\Validator::alnum'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => 'Create ticket when contact and account does not exist, type: boolean',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
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",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sanitization' => '\App\Purifier::bool'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'validation' => '\App\Validator::bool',
- Exclude checks
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.'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => 'T2',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'attachMailBodyGraphicUrl' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'default' => 'Open',
- Exclude checks
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.'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'ONE_MAIL_FOR_MULTIPLE_RECIPIENTS' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sanitization' => '\App\Purifier::bool'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sanitization' => '\App\Purifier::bool'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => 'What status should be set when a ticket is created.'
- Exclude checks