ImpressCMS/impresscms

View on GitHub
htdocs/include/jalali.php

Summary

Maintainability
F
4 days
Test Coverage

Function jdate has a Cognitive Complexity of 119 (exceeds 5 allowed). Consider refactoring.
Open

function jdate($type,$maket='now') {
    global $icmsConfig;
    icms_loadLanguageFile('core', 'calendar');
    $result='';
    if ($maket=='now') {
Severity: Minor
Found in htdocs/include/jalali.php - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method jdate has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function jdate($type,$maket='now') {
    global $icmsConfig;
    icms_loadLanguageFile('core', 'calendar');
    $result='';
    if ($maket=='now') {
Severity: Major
Found in htdocs/include/jalali.php - About 5 hrs to fix

    Function lastday has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    function lastday ($month,$day,$year) {
        $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        $lastdatep=$jday;
        while ($jday!='1')
    Severity: Minor
    Found in htdocs/include/jalali.php - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method jalali_to_gregorian has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function jalali_to_gregorian($j_y, $j_m, $j_d) {
        $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
        $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
    
        $jy = $j_y-979;
    Severity: Minor
    Found in htdocs/include/jalali.php - About 1 hr to fix

      Method jmaketime has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear) {
      Severity: Minor
      Found in htdocs/include/jalali.php - About 45 mins to fix

        Function jalali_to_gregorian has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php - About 45 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function gregorian_to_jalali has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        The function jdate() has 131 lines of code. Current threshold is set to 100. Avoid really long methods.
        Open

        function jdate($type,$maket='now') {
            global $icmsConfig;
            icms_loadLanguageFile('core', 'calendar');
            $result='';
            if ($maket=='now') {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        The function jdate() has a Cyclomatic Complexity of 42. The configured cyclomatic complexity threshold is 10.
        Open

        function jdate($type,$maket='now') {
            global $icmsConfig;
            icms_loadLanguageFile('core', 'calendar');
            $result='';
            if ($maket=='now') {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CyclomaticComplexity

        Since: 0.1

        Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

        Example

        // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

        Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

        Avoid unused local variables such as '$icmsConfig'.
        Open

            global $icmsConfig;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        UnusedLocalVariable

        Since: 0.2

        Detects when a local variable is declared and/or assigned, but not used.

        Example

        class Foo {
            public function doSomething()
            {
                $i = 5; // Unused
            }
        }

        Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

        Avoid unused local variables such as '$jday'.
        Open

            list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        UnusedLocalVariable

        Since: 0.2

        Detects when a local variable is declared and/or assigned, but not used.

        Example

        class Foo {
            public function doSomething()
            {
                $i = 5; // Unused
            }
        }

        Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_TUESDAY
        Open

                        else if ($result1=='Tuesday') $result1=_CAL_TUESDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_SUFFIX
        Open

                        $result.=_CAL_SUFFIX;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

            list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_SAT
        Open

                        if ($result1=='Sat') $result1=_CAL_SAT;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_WEDNESDAY
        Open

                        else if ($result1=='Wednesday') $result1=_CAL_WEDNESDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_USE_LOCAL_NUM
        Open

            $basecheck = defined('_USE_LOCAL_NUM') && _USE_LOCAL_NUM;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_TUE
        Open

                        else if ($result1=='Tue') $result1=_CAL_TUE;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_MONDAY
        Open

                        else if ($result1=='Monday') $result1=_CAL_MONDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Invalid operator: right operand of + is bool (expected array or number)
        Open

            for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++)
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_PM
        Open

                        if ($result1=='pm') $result.=_CAL_PM;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_FRIDAY
        Open

                        else if ($result1=='Friday') $result1=_CAL_FRIDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_AM_LONG
        Open

                        else $result.=_CAL_AM_LONG;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_WED
        Open

                        else if ($result1=='Wed') $result1=_CAL_WED;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_SUN
        Open

                        else if ($result1=='Sun') $result1=_CAL_SUN;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_THU
        Open

                        else if ($result1=='Thu') $result1=_CAL_THU;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_SATURDAY
        Open

                        if ($result1=='Saturday') $result1=_CAL_SATURDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_FRI
        Open

                        else if ($result1=='Fri') $result1=_CAL_FRI;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 6 (year) is string but \mktime() takes int
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_AM
        Open

                        else $result.=_CAL_AM;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_THURSDAY
        Open

                        else if ($result1=='Thursday') $result1=_CAL_THURSDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                    list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_PM_LONG
        Open

                        if ($result1=='pm') $result.=_CAL_PM_LONG;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_MON
        Open

                        else if ($result1=='Mon') $result1=_CAL_MON;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                    list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (j_d) is '1' but \jalali_to_gregorian() takes int defined at /code/htdocs/include/jalali.php:102
        Open

            list( $year, $month, $day ) = jalali_to_gregorian($jyear, $jmonth, '1');
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

            list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

            list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Invalid operator: right operand of + is bool (expected array or number)
        Open

            $g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 3 (g_d) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 2 (g_m) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Reference to undeclared constant \_CAL_SUNDAY
        Open

                        else if ($result1=='Sunday') $result1=_CAL_SUNDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        Argument 1 (g_y) is string but \gregorian_to_jalali() takes int defined at /code/htdocs/include/jalali.php:55
        Open

                        list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phan

        The method lastday uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $day=0;
                    $month++;
                    if ($month==13)
                    {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ElseExpression

        Since: 1.4.0

        An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($flag) {
                    // one branch
                } else {
                    // another branch
                }
            }
        }

        Source https://phpmd.org/rules/cleancode.html#elseexpression

        The method jdate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

            } else {
                $date=date('Y-m-d',$maket);
                list( $year, $month, $day ) = preg_split ( '/-/', $date );
        
                list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ElseExpression

        Since: 1.4.0

        An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($flag) {
                    // one branch
                } else {
                    // another branch
                }
            }
        }

        Source https://phpmd.org/rules/cleancode.html#elseexpression

        Avoid assigning values to variables in if clauses and the like (line '188', column '8').
        Open

        function lastday ($month,$day,$year) {
            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
            list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
            $lastdatep=$jday;
            while ($jday!='1')
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    case 'D':
                        $result1=date('D',$need);
                        if ($result1=='Sat') $result1=_CAL_SAT;
                        else if ($result1=='Sun') $result1=_CAL_SUN;
                        else if ($result1=='Mon') $result1=_CAL_MON;
        Severity: Major
        Found in htdocs/include/jalali.php and 1 other location - About 4 hrs to fix
        htdocs/include/jalali.php on lines 314..324

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 180.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    case 'l':
                        $result1=date('l',$need);
                        if ($result1=='Saturday') $result1=_CAL_SATURDAY;
                        else if ($result1=='Sunday') $result1=_CAL_SUNDAY;
                        else if ($result1=='Monday') $result1=_CAL_MONDAY;
        Severity: Major
        Found in htdocs/include/jalali.php and 1 other location - About 4 hrs to fix
        htdocs/include/jalali.php on lines 280..290

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 180.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        The parameter $j_y is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseParameterName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name parameters.

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        Avoid variables with short names like $jd. Configured minimum length is 3.
        Open

            $jd = $j_day_no+1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        The parameter $j_d is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseParameterName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name parameters.

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        Avoid variables with short names like $gm. Configured minimum length is 3.
        Open

            $gm = $g_m-1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $jy. Configured minimum length is 3.
        Open

            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $gm. Configured minimum length is 3.
        Open

            $gm = $i+1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        The parameter $j_m is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseParameterName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name parameters.

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        Avoid variables with short names like $gd. Configured minimum length is 3.
        Open

            $gd = $g_day_no+1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $jm. Configured minimum length is 3.
        Open

            $jm = $i+1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $gd. Configured minimum length is 3.
        Open

            $gd = $g_d-1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $jy. Configured minimum length is 3.
        Open

            $jy = 979+33*$j_np+4*div($j_day_no,1461); /* 1461 = 365*4 + 4/4 */
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $b. Configured minimum length is 3.
        Open

        function div($a,$b) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        The parameter $g_d is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseParameterName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name parameters.

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        Avoid variables with short names like $a. Configured minimum length is 3.
        Open

        function div($a,$b) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        The parameter $g_m is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseParameterName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name parameters.

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        Avoid variables with short names like $gy. Configured minimum length is 3.
        Open

            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $i. Configured minimum length is 3.
        Open

            $i=0;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $jm. Configured minimum length is 3.
        Open

            $jm = $j_m-1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $jd. Configured minimum length is 3.
        Open

            $jd = $j_d-1;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $gy. Configured minimum length is 3.
        Open

            $gy = 1600 + 400*div($g_day_no, 146097); /* 146097 = 365*400 + 400/4 - 400/100 + 400/400 */
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        Avoid variables with short names like $i. Configured minimum length is 3.
        Open

            $i=mktime($hour,$minute,$second,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        The parameter $g_y is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseParameterName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name parameters.

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        Incorrect spacing between default value and equals sign for argument "$maket"; expected 1 but found 0
        Open

        function jdate($type,$maket='now') {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 0 spaces before opening parenthesis; 1 found
        Open

        function lastday ($month,$day,$year) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after comma in function call; 2 found
        Open

             $gy += 100*div($g_day_no,  36524); /* 36524 = 365*100 + 100/4 - 100/100 */
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected "function abc(...)"; found "function abc (...)"
        Open

        function lastday ($month,$day,$year) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Blank line found at end of control structure
        Open

        
        
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Blank line found at start of control structure
        Open

                {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Incorrect spacing between argument "$maket" and equals sign; expected 1 but found 0
        Open

        function jdate($type,$maket='now') {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        CASE keyword must be followed by a single space
        Open

                    case'F':
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        if ($jday<10)$result1='0'.$jday;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

            for ($i=0; $i < $jm; ++$i)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else    $result1=$jmonth;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Sun') $result1=_CAL_SUN;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Monday') $result1=_CAL_MONDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Mon') $result1=_CAL_MON;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Thu') $result1=_CAL_THU;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else $result.=_CAL_AM_LONG;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        if ($result1=='Sat') $result1=_CAL_SAT;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Sunday') $result1=_CAL_SUNDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

            for ($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        if ($result1=='Saturday') $result1=_CAL_SATURDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        if ($result1=='pm') $result.=_CAL_PM_LONG;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Thursday') $result1=_CAL_THURSDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Friday') $result1=_CAL_FRIDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Wednesday') $result1=_CAL_WEDNESDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        if ($jmonth<10) $result1='0'.$jmonth;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Tuesday') $result1=_CAL_TUESDAY;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

            for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                    if ($jday='1') $lastdatep++;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Tue') $result1=_CAL_TUE;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

            for ($i=0; $i < $gm; ++$i)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

            if ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0)))
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else $result.=_CAL_AM;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                    if ($jday=='1') break;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Fri') $result1=_CAL_FRI;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

             if ($g_day_no >= 365)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else if ($result1=='Wed') $result1=_CAL_WED;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        else     $result1=$jday;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

             else
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Inline control structures are not allowed
        Open

                        if ($result1=='pm') $result.=_CAL_PM;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 13
        Open

                    if ($month==13)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $maket=jmaketime(date('h'),date('i'),date('s'),$jmonth,$jday,$jyear);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $year=date('Y',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=lastday ($month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $jy = 979+33*$j_np+4*div($j_day_no,1461); /* 1461 = 365*4 + 4/4 */
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$year"; 0 found
        Open

        function mstart($month,$day,$year) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Space after opening parenthesis of function call prohibited
        Open

                list( $year, $month, $day ) = preg_split ( '/-/', $date );
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('G',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('h',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $g_day_no = 365*$gy+div($gy+3,4)-div($gy+99,100)+div($gy+399,400);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $gy += 100*div($g_day_no,  36524); /* 36524 = 365*100 + 100/4 - 100/100 */
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $i=mktime($hour,$minute,$second,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $maket=jmaketime(date('h'),date('i'),date('s'),$jmonth,$jday,$jyear);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $month=date('m',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected 2 tabs, found 1
        Open

             else
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$day"; 0 found
        Open

        function mstart($month,$day,$year) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $timestamp=mktime(0,0,0,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$minute"; 0 found
        Open

        function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$jyear"; 0 found
        Open

        function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result1=date('a',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=substr($jyear,2,4);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $timestamp=mktime(0,0,0,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $timestamp=mktime(0,0,0,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $timestamp=mktime(0,0,0,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $day=date('d',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('w',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $g_day_no = $g_day_no % 36524;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $i=mktime($hour,$minute,$second,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Space before opening parenthesis of function call prohibited
        Open

                        $result.=lastday ($month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $g_day_no = 365*$gy+div($gy+3,4)-div($gy+99,100)+div($gy+399,400);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $g_day_no--;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $timestamp=mktime(0,0,0,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             if ($g_day_no >= 365)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('g',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$year"; 0 found
        Open

        function lastday ($month,$day,$year) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result1=date('a',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('s',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found " /* 36525 = 365*100 + 100/4 */\n "
        Open

            if ($g_day_no >= 36525) /* 36525 = 365*100 + 100/4 */
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $leap = false;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 5
        Open

            while ($jday!='1')
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 9
        Open

                if ($day<$lastdayen)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $maket=jmaketime(date('h'),date('i'),date('s'),$jmonth,$jday,$jyear);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('H',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=date('i',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after ELSE keyword; newline found
        Open

             else
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 9
        Open

                switch ($subtype)
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after ELSE keyword; 4 found
        Open

                        else     $result1=$jday;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$b"; 0 found
        Open

        function div($a,$b) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $gy += div($g_day_no, 365);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after ELSE keyword; 4 found
        Open

                        else    $result1=$jmonth;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $g_day_no = $g_day_no % 365;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$second"; 0 found
        Open

        function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$jmonth"; 0 found
        Open

        function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$jday"; 0 found
        Open

        function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $i=mktime($hour,$minute,$second,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $i=mktime($hour,$minute,$second,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $i=mktime($hour,$minute,$second,$month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $maket=jmaketime(date('h'),date('i'),date('s'),$jmonth,$jday,$jyear);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Space before opening parenthesis of function call prohibited
        Open

                list( $year, $month, $day ) = preg_split ( '/-/', $date );
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space after closing parenthesis; found 5
        Open

            while ($i<strlen($type))
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $subtype=substr($type,$i,1);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $subtype=substr($type,$i,1);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result1=date('l',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=lastday ($month,$day,$year);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Line indented incorrectly; expected at least 2 tabs, found 1
        Open

             $g_day_no--;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result.=substr($jyear,2,4);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 newline at end of file; 0 found
        Open

        }
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            return date('w',$timestamp);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$day"; 0 found
        Open

        function lastday ($month,$day,$year) {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $date=date('Y-m-d',$maket);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 0 spaces before closing bracket; 1 found
        Open

                list( $year, $month, $day ) = preg_split ( '/-/', $date );
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

            $g_day_no = 365*$gy+div($gy+3,4)-div($gy+99,100)+div($gy+399,400);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        Expected 1 space between comma and argument "$maket"; 0 found
        Open

        function jdate($type,$maket='now') {
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                $maket=jmaketime(date('h'),date('i'),date('s'),$jmonth,$jday,$jyear);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        No space found after comma in function call
        Open

                        $result1=date('D',$need);
        Severity: Minor
        Found in htdocs/include/jalali.php by phpcodesniffer

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_m is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_np is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_y is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_days_in_month is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_days_in_month is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_d is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_days_in_month is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_days_in_month is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_days_in_month is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_days_in_month is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_days_in_month is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_days_in_month is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_d is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_m is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_days_in_month is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_day_no is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_y is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_np is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $j_days_in_month is not named in camelCase.
        Open

        function gregorian_to_jalali($g_y, $g_m, $g_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $gy = $g_y-1600;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        The variable $g_day_no is not named in camelCase.
        Open

        function jalali_to_gregorian($j_y, $j_m, $j_d) {
            $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
            $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
        
            $jy = $j_y-979;
        Severity: Minor
        Found in htdocs/include/jalali.php by phpmd

        CamelCaseVariableName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name variables.

        Example

        class ClassName {
            public function doSomething() {
                $data_module = new DataModule();
            }
        }

        Source

        Unexpected spaces found.
        Open

             $g_day_no = $g_day_no % 36524;
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             if ($g_day_no >= 365)
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             else
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             $gy += div($g_day_no, 365);
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             $g_day_no = $g_day_no % 365;
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             $gy += 100*div($g_day_no,  36524); /* 36524 = 365*100 + 100/4 - 100/100 */
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             $leap = false;
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             $g_day_no--;
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        Unexpected spaces found.
        Open

             $g_day_no--;
        Severity: Minor
        Found in htdocs/include/jalali.php by editorconfig

        There are no issues that match your filters.

        Category
        Status