YetiForceCompany/YetiForceCRM

View on GitHub
modules/Users/UserTimeZonesArray.php

Summary

Maintainability
A
3 hrs
Test Coverage
F
0%

Method getTimeZones has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getTimeZones()
    {
        return [
            'Pacific/Midway',
            'Pacific/Samoa',
Severity: Major
Found in modules/Users/UserTimeZonesArray.php - About 3 hrs to fix

    The method getTimeZones() has 101 lines of code. Current threshold is set to 100. Avoid really long methods.
    Open

        public static function getTimeZones()
        {
            return [
                'Pacific/Midway',
                'Pacific/Samoa',
    Severity: Minor
    Found in modules/Users/UserTimeZonesArray.php by phpmd

    Remove this commented out code.
    Open

     * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;

    Programmers should not comment out code as it bloats programs and reduces readability.

    Unused code should be deleted and can be retrieved from source control history if required.

    See

    • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
    • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
    • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
    • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class UserTimeZones

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

                'America/Tegucigalpa',

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

                'America/Mexico_City',

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

                'America/Caracas',

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

                'America/Halifax',

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

                'Africa/Monrovia',

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

                'Asia/Almaty',

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

                'Asia/Irkutsk',

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

                'Asia/Yakutsk',

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

                'America/Monterrey',

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

                'America/Manaus',

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

                'America/Santiago',

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

                'America/Montevideo',

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

                'Africa/Cairo',

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

                'Asia/Katmandu',

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

                'Australia/Perth',

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

                'Australia/Hobart',

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

                'Asia/Amman',

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

                'Asia/Beirut',

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

                'Pacific/Samoa',

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

                'Asia/Tokyo',

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

                'America/La_Paz',

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

                'America/Sao_Paulo',

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

                'Atlantic/South_Georgia',

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

                'America/Tijuana',

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

                'Asia/Baghdad',

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

                'Pacific/Guam',

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

                'Africa/Casablanca',

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

                'Asia/Tehran',

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

                'Asia/Rangoon',

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

                'Asia/Ulaanbaatar',

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

                'America/Bogota',

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

                'America/Indiana/Indianapolis',

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

                'America/Cuiaba',

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

                'America/Godthab',

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

                'Atlantic/Cape_Verde',

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

                'Europe/Sarajevo',

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

                'Africa/Harare',

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

                'Asia/Karachi',

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

        public static function getTimeZones()

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

        {

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

            return [

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

                'America/Denver',

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

                'America/Chihuahua',

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

                'America/Asuncion',

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

                'Asia/Tbilisi',

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

                'Asia/Tashkent',

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

                'Asia/Novosibirsk',

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

                'Asia/Brunei',

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

                'Asia/Seoul',

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

                'Australia/Canberra',

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

                'Pacific/Honolulu',

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

                'America/Lima',

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

                'Europe/Minsk',

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

                'Asia/Vladivostok',

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

                'America/Anchorage',

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

                'America/Chicago',

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

                'UTC',

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

                'Europe/Helsinki',

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

                'Europe/Athens',

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

                'Europe/Moscow',

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

                'Asia/Colombo',

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

                'America/Rio_Branco',

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

                'Atlantic/Azores',

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

                'Europe/Belgrade',

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

                'Asia/Yerevan',

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

                'America/St_Johns',

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

                'Europe/Amsterdam',

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

                'Europe/Istanbul',

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

                'Asia/Jerusalem',

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

                'Asia/Baku',

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

                'Asia/Krasnoyarsk',

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

                'America/Los_Angeles',

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

                'Africa/Windhoek',

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

                'Asia/Kuwait',

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

                'Asia/Muscat',

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

                'Asia/Taipei',

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

                'Australia/Brisbane',

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

                'Pacific/Fiji',

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

                'Pacific/Midway',

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

                'America/New_York',

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

                'Asia/Kolkata',

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

                'Asia/Kamchatka',

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

                'America/Mazatlan',

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

                'America/Argentina/Buenos_Aires',

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

                'America/Phoenix',

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

                'Europe/London',

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

                'Europe/Brussels',

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

                'America/Regina',

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

                'Africa/Algiers',

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

                'Australia/Darwin',

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

                'Africa/Nairobi',

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

                'Pacific/Tongatapu',

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

                'Asia/Dhaka',

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

                'Asia/Yekaterinburg',

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

                'Asia/Bangkok',

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

                'Asia/Kuala_Lumpur',

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

                'Australia/Adelaide',

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

                'Pacific/Auckland',

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

            ];

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

        }

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

                'Asia/Magadan',

    There are no issues that match your filters.

    Category
    Status