mambax7/cardealer

View on GitHub
class/Common/ServerStats.php

Summary

Maintainability
A
1 hr
Test Coverage

Method getServerStats has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getServerStats()
    {
        $moduleDirName      = basename(dirname(dirname(__DIR__)));
        $moduleDirNameUpper = strtoupper($moduleDirName);
        xoops_loadLanguage('common', $moduleDirName);
Severity: Minor
Found in class/Common/ServerStats.php - About 1 hr to fix

    Line exceeds 120 characters; contains 236 characters
    Open

            $downloads = ini_get('file_uploads') ? '<span style="color: #008000;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    Line exceeds 120 characters; contains 159 characters
    Open

            $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . ini_get('memory_limit') . '</span></b>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    Line exceeds 120 characters; contains 137 characters
    Open

            $html .= "<legend style='font-weight: bold; color: #900;'>" . constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . '</legend>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    Line exceeds 120 characters; contains 239 characters
    Open

            $gdlib = function_exists('gd_info') ? '<span style="color: #008000;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    Line exceeds 120 characters; contains 168 characters
    Open

            $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . '</span></b>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    Line exceeds 120 characters; contains 130 characters
    Open

                    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    Line exceeds 120 characters; contains 160 characters
    Open

            $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . ini_get('post_max_size') . '</span></b>';
    Severity: Minor
    Found in class/Common/ServerStats.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status