YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Language.php

Summary

Maintainability
A
0 mins
Test Coverage
B
88%

Missing class import via use statement (line '25', column '17').
Open

        $query = (new \App\Db\Query())->select(['prefix'])->from('vtiger_language');
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

            $langFilePath = "languages/$lang/Settings/{$moduleInstance->name}.json";
Severity: Minor
Found in vtlib/Vtiger/Language.php by phan

Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

            $langFilePath = "languages/$lang/{$moduleInstance->name}.json";
Severity: Minor
Found in vtlib/Vtiger/Language.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $query = (new \App\Db\Query())->select(['prefix'])->from('vtiger_language');
Severity: Critical
Found in vtlib/Vtiger/Language.php by phan

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

            $langFilePath = "languages/$lang/{$moduleInstance->name}.json";
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

            }
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

     * @param ModuleBasic $moduleInstance
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

            $langFilePath = "languages/$lang/Settings/{$moduleInstance->name}.json";
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

                unlink($langFilePath);
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

    }
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

            if (file_exists($langFilePath)) {
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

     * Function to remove language files related to a module.
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

        }
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

        $query = (new \App\Db\Query())->select(['prefix'])->from('vtiger_language');
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

                unlink($langFilePath);
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

    /**
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

     */
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

    {
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

            if (file_exists($langFilePath)) {
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

            }
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

     *
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

        foreach ($query->column() as $lang) {
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

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

    public static function deleteForModule(ModuleBasic $moduleInstance)
Severity: Minor
Found in vtlib/Vtiger/Language.php by phpcodesniffer

There are no issues that match your filters.

Category
Status