ImpressCMS/impresscms

View on GitHub
htdocs/install/include/functions.php

Summary

Maintainability
F
1 wk
Test Coverage

The function imcms_get_base_domain() calls the typical debug function print_r() which is mostly only used during development.
Open

    if ($debug) print_r($DOMAIN);
Severity: Minor
Found in htdocs/install/include/functions.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

Source https://phpmd.org/rules/design.html#developmentcodefragment

The function imcms_get_base_domain() calls the typical debug function print_r() which is mostly only used during development.
Open

    if ($debug) print_r($DOMAIN);
Severity: Minor
Found in htdocs/install/include/functions.php by phpmd

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

Source https://phpmd.org/rules/design.html#developmentcodefragment

Method imcms_get_base_domain has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function imcms_get_base_domain($url)
{
    $debug = 0;
    $base_domain = '';

Severity: Minor
Found in htdocs/install/include/functions.php - About 1 hr to fix

    Function imcms_get_base_domain has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.php - About 55 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 imcms_get_base_domain() has an NPath complexity of 256. The configured NPath complexity threshold is 200.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.php by phpmd

    NPathComplexity

    Since: 0.1

    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

    Example

    class Foo {
        function bar() {
            // lots of complicated code
        }
    }

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

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

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 assigning values to variables in if clauses and the like (line '54', column '7').
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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

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

        } else {
            $full_domain = $DOMAIN[1].'.'.$DOMAIN[0];
        }
    Severity: Minor
    Found in htdocs/install/include/functions.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

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

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Major
    Found in htdocs/install/include/functions.php and 1 other location - About 6 days to fix
    htdocs/include/functions.php on lines 1028..1090

    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 1207.

    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

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'de','dj','dk','dm','do','dz','ec','ee','eg','er','es','et','eu','fi','fj','fk','fm','fo',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'gy','hk','hm','hn','hr','ht','hu','id','ie','il','im','in','io','iq','ir','is','it','je',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'biz','com','edu','gov','info','int','mil','name','net','org','aero','asia','cat','coop','jobs','mobi','museum','pro','tel','travel',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'fr','ga','gd','ge','gf','gg','gh','gi','gl','gm','gn','gp','gq','gr','gs','gt','gu','gw',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'eh','kp','me','rs','um','bv','gb','pm','sj','so','yt','su','tp','bu','cs','dd','zr');

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'mr','ms','mt','mu','mv','mw','mx','my','mz','na','nc','ne','nf','ng','ni','nl','no','np',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'arpa','root','berlin','bzh','cym','gal','geo','kid','kids','lat','mail','nyc','post','sco','web','xxx',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'jm','jo','jp','ke','kg','kh','ki','km','kn','kr','kw','ky','kz','la','lb','lc','li','lk',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'sv','sy','sz','tc','td','tf','tg','th','tj','tk','tl','tm','tn','to','tr','tt','tv','tw',

    Opening brace should be on the same line as the declaration
    Open

    {

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'lr','ls','lt','lu','lv','ly','ma','mc','md','mg','mh','mk','ml','mm','mn','mo','mp','mq',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'za','zm','zw',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'nr','nu','nz','om','pa','pe','pf','pg','ph','pk','pl','pn','pr','ps','pt','pw','py','qa',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'nato', 'example','invalid','localhost','test','bitnet','csnet','ip','local','onion','uucp','co');

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'ba','bb','bd','be','bf','bg','bh','bi','bj','bm','bn','bo','br','bs','bt','bw','by','bz',

    Expected 1 blank line at end of file; 2 found
    Open

    }

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'ac','ad','ae','af','ag','ai','al','am','an','ao','aq','ar','as','at','au','aw','ax','az',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'tz','ua','ug','uk','us','uy','uz','va','vc','ve','vg','vi','vn','vu','wf','ws','ye','yu',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         're','ro','ru','rw','sa','sb','sc','sd','se','sg','sh','si','sk','sl','sm','sn','sr','st',

    Tabs must be used to indent lines; spaces are not allowed
    Open

         'ca','cc','cd','cf','cg','ch','ci','ck','cl','cm','cn','co','cr','cu','cv','cx','cy','cz',

    Opening brace should be on the same line as the declaration
    Open

    {

    Inline control structures are not allowed
    Open

        if (count($DOMAIN) <= 2) return $full_domain;

    Inline control structures are not allowed
    Open

        if ($debug) print_r($DOMAIN);

    Inline control structures are not allowed
    Open

        if ($debug) print_r($DOMAIN);

    Newline required after opening brace
    Open

        if (!$full_domain = imcms_get_url_domain($url)) {return $base_domain;}

    Closing brace must be on a line by itself
    Open

        if (count($DOMAIN) == 4 && is_numeric($DOMAIN[0]) && is_numeric($DOMAIN[3])) {return $full_domain;}

    Expected 1 space after closing parenthesis; found 5
    Open

        if (in_array($DOMAIN[0], $C_TLD) && in_array($DOMAIN[1], $G_TLD) && $DOMAIN[2] != 'www')

    Closing brace must be on a line by itself
    Open

        if (!$full_domain = imcms_get_url_domain($url)) {return $base_domain;}

    Newline required after opening brace
    Open

        if (count($DOMAIN) == 4 && is_numeric($DOMAIN[0]) && is_numeric($DOMAIN[3])) {return $full_domain;}

    Newline required after opening brace
    Open

        if (!empty($_URL) || !empty($_URL['host'])) {$domain = $_URL['host'];}

    Closing brace must be on a line by itself
    Open

        if (!empty($_URL) || !empty($_URL['host'])) {$domain = $_URL['host'];}

    The variable $C_TLD is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $_URL is not named in camelCase.
    Open

    function imcms_get_url_domain($url)
    {
        $domain = '';
        $_URL = parse_url($url);
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $_URL is not named in camelCase.
    Open

    function imcms_get_url_domain($url)
    {
        $domain = '';
        $_URL = parse_url($url);
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $base_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $base_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $_URL is not named in camelCase.
    Open

    function imcms_get_url_domain($url)
    {
        $domain = '';
        $_URL = parse_url($url);
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $C_TLD is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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_TLD is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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_TLD is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $full_domain is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $_URL is not named in camelCase.
    Open

    function imcms_get_url_domain($url)
    {
        $domain = '';
        $_URL = parse_url($url);
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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 $DOMAIN is not named in camelCase.
    Open

    function imcms_get_base_domain($url)
    {
        $debug = 0;
        $base_domain = '';
    
    
    Severity: Minor
    Found in htdocs/install/include/functions.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

         'ca','cc','cd','cf','cg','ch','ci','ck','cl','cm','cn','co','cr','cu','cv','cx','cy','cz',

    Unexpected spaces found.
    Open

         'biz','com','edu','gov','info','int','mil','name','net','org','aero','asia','cat','coop','jobs','mobi','museum','pro','tel','travel',

    Unexpected spaces found.
    Open

         'arpa','root','berlin','bzh','cym','gal','geo','kid','kids','lat','mail','nyc','post','sco','web','xxx',

    Unexpected spaces found.
    Open

         'za','zm','zw',

    Unexpected spaces found.
    Open

         'eh','kp','me','rs','um','bv','gb','pm','sj','so','yt','su','tp','bu','cs','dd','zr');

    Unexpected spaces found.
    Open

         'ba','bb','bd','be','bf','bg','bh','bi','bj','bm','bn','bo','br','bs','bt','bw','by','bz',

    Unexpected spaces found.
    Open

         'nato', 'example','invalid','localhost','test','bitnet','csnet','ip','local','onion','uucp','co');

    Unexpected spaces found.
    Open

         'mr','ms','mt','mu','mv','mw','mx','my','mz','na','nc','ne','nf','ng','ni','nl','no','np',

    Unexpected spaces found.
    Open

         'ac','ad','ae','af','ag','ai','al','am','an','ao','aq','ar','as','at','au','aw','ax','az',

    Unexpected spaces found.
    Open

         'sv','sy','sz','tc','td','tf','tg','th','tj','tk','tl','tm','tn','to','tr','tt','tv','tw',

    Unexpected spaces found.
    Open

         're','ro','ru','rw','sa','sb','sc','sd','se','sg','sh','si','sk','sl','sm','sn','sr','st',

    Unexpected spaces found.
    Open

         'tz','ua','ug','uk','us','uy','uz','va','vc','ve','vg','vi','vn','vu','wf','ws','ye','yu',

    Unexpected spaces found.
    Open

         'nr','nu','nz','om','pa','pe','pf','pg','ph','pk','pl','pn','pr','ps','pt','pw','py','qa',

    Unexpected spaces found.
    Open

         'de','dj','dk','dm','do','dz','ec','ee','eg','er','es','et','eu','fi','fj','fk','fm','fo',

    Unexpected spaces found.
    Open

         'gy','hk','hm','hn','hr','ht','hu','id','ie','il','im','in','io','iq','ir','is','it','je',

    Unexpected spaces found.
    Open

         'lr','ls','lt','lu','lv','ly','ma','mc','md','mg','mh','mk','ml','mm','mn','mo','mp','mq',

    Unexpected spaces found.
    Open

         'jm','jo','jp','ke','kg','kh','ki','km','kn','kr','kw','ky','kz','la','lb','lc','li','lk',

    Unexpected spaces found.
    Open

         'fr','ga','gd','ge','gf','gg','gh','gi','gl','gm','gn','gp','gq','gr','gs','gt','gu','gw',

    There are no issues that match your filters.

    Category
    Status