YetiForceCompany/YetiForceCRM

View on GitHub
config/mimetypes.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Define a constant instead of duplicating this literal "application/msword" 3 times.
Open

    'doc' => 'application/msword',
Severity: Critical
Found in config/mimetypes.php by sonar-php

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 "application/vnd.ms-powerpoint" 4 times.
Open

    'ppt' => 'application/vnd.ms-powerpoint',
Severity: Critical
Found in config/mimetypes.php by sonar-php

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 "application/postscript" 3 times.
Open

    'ai' => 'application/postscript',
Severity: Critical
Found in config/mimetypes.php by sonar-php

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 "image/jpeg" 3 times.
Open

    'jpg' => 'image/jpeg',
Severity: Critical
Found in config/mimetypes.php by sonar-php

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 "application/vnd.ms-excel" 7 times.
Open

    'xls' => 'application/vnd.ms-excel',
Severity: Critical
Found in config/mimetypes.php by sonar-php

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

    'js' => 'application/javascript',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'jpg' => 'image/jpeg',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'exe' => 'application/x-msdownload',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ppt' => 'application/vnd.ms-powerpoint',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'pps' => 'application/vnd.ms-powerpoint',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ics' => 'text/calendar',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'swf' => 'application/x-shockwave-flash',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    // images
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlm' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'html' => 'text/html',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    // archives
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    // ms office
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odt' => 'application/vnd.oasis.opendocument.text',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    //other
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xla' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'otp' => 'application/vnd.oasis.opendocument.presentation-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odc' => 'application/vnd.oasis.opendocument.chart',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'otf' => 'application/vnd.oasis.opendocument.formula-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odg' => 'application/vnd.oasis.opendocument.graphics',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odp' => 'application/vnd.oasis.opendocument.presentation',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'dwg' => 'application/acad',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'mov' => 'video/quicktime',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ps' => 'application/postscript',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xls' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ppt' => 'application/vnd.ms-powerpoint',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ico' => 'image/vnd.microsoft.icon',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    // adobe
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'psd' => 'image/vnd.adobe.photoshop',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odi' => 'application/vnd.oasis.opendocument.image',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odt' => 'application/vnd.oasis.opendocument.text',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'tiff' => 'image/tiff',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'zip' => 'application/zip',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'cab' => 'application/vnd.ms-cab-compressed',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'doc' => 'application/msword',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xls' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'pdf' => 'application/pdf',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    's7z' => 'application/x-7z-compressed',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xml' => 'application/xml',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'tif' => 'image/tiff',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    // audio/video
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'pot' => 'application/vnd.ms-powerpoint',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'odf' => 'application/vnd.oasis.opendocument.formula',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'bmp' => 'image/bmp',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'rtf' => 'application/rtf',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    // open office
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'otc' => 'application/vnd.oasis.opendocument.chart-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'rar' => 'application/x-rar-compressed',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'htm' => 'text/html',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'flv' => 'video/x-flv',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'jpeg' => 'image/jpeg',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'svg' => 'image/svg+xml',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'otm' => 'application/vnd.oasis.opendocument.text-master',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'txt' => 'text/plain',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'php' => 'text/php',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'gif' => 'image/gif',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'mp3' => 'audio/mpeg',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ott' => 'application/vnd.oasis.opendocument.text-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    '7z' => 'application/x-7z-compressed',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'csv' => 'text/plain',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'svgz' => 'image/svg+xml',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlt' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'dot' => 'application/msword',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xps' => 'application/vnd.ms-xpsdocument',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'png' => 'image/png',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'rar' => 'application/x-rar-compressed',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'qt' => 'video/quicktime',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ai' => 'application/postscript',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlc' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'doc' => 'application/msword',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'css' => 'text/css',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'json' => 'application/json',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'msi' => 'application/x-msdownload',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'otg' => 'application/vnd.oasis.opendocument.graphics-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'jpe' => 'image/jpeg',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'pdf' => 'application/pdf',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'oti' => 'application/vnd.oasis.opendocument.image-template',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'eps' => 'application/postscript',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'xlw' => 'application/vnd.ms-excel',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'oth' => 'application/vnd.oasis.opendocument.text-web',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

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

    'vcf' => 'text/vcard',
Severity: Minor
Found in config/mimetypes.php by phpcodesniffer

There are no issues that match your filters.

Category
Status