ImpressCMS/impresscms

View on GitHub
htdocs/install/page_modcheck.php

Summary

Maintainability
A
1 hr
Test Coverage

xoDiag accesses the super-global variable $GLOBALS.
Open

function xoDiag( $status = -1, $str = '') {
    if ($status == -1) {
        $GLOBALS['error'] = true;
    }
    $classes = array( -1 => 'error', 0 => 'warning', 1 => 'success' );
Severity: Minor
Found in htdocs/install/page_modcheck.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Method imCheckRequirements has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function imCheckRequirements()
{
    $requirement['server_api']['description']=PHP_SAPI;
    $requirement['server_api']['result']=php_sapi_name();
    $requirement['server_api']['status']=true;
Severity: Minor
Found in htdocs/install/page_modcheck.php - About 1 hr to fix

    The function imCheckRequirements() has an NPath complexity of 8192. The configured NPath complexity threshold is 200.
    Open

    function imCheckRequirements()
    {
        $requirement['server_api']['description']=PHP_SAPI;
        $requirement['server_api']['result']=php_sapi_name();
        $requirement['server_api']['status']=true;
    Severity: Minor
    Found in htdocs/install/page_modcheck.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 imCheckRequirements() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
    Open

    function imCheckRequirements()
    {
        $requirement['server_api']['description']=PHP_SAPI;
        $requirement['server_api']['result']=php_sapi_name();
        $requirement['server_api']['status']=true;
    Severity: Minor
    Found in htdocs/install/page_modcheck.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 using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['file_upload']['status']=xoDiagBoolSetting( 'file_uploads', true ) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

            $requirement['php_version']['status']=1;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['session']['description']="Session Extension";
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['session']['status']=extension_loaded( 'session' ) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['server_api']['result']=php_sapi_name();
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['curl']['result']=extension_loaded( 'curl' ) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['server_api']['status']=true;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['php_version']['result']=phpversion();
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['pcre']['status']=extension_loaded( 'PCRE' ) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['file_upload']['result']=xoDiagBoolSetting( 'file_uploads', true ) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['gd']['description']="GD Extension";
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['mysql']['description']="MySQL Handler";
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['curl']['status']=extension_loaded( 'curl' ) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

            $requirement['php_version']['status']=0;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['mysql']['result']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['gd']['result']=extension_loaded( 'GD' ) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['server_api']['description']=PHP_SAPI;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['mysql']['status']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['pcre']['result']=extension_loaded( 'PCRE' ) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['php_version']['description']=_PHP_VERSION;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['session']['result']=extension_loaded( 'session' ) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['gd']['status']=extension_loaded( 'GD' ) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['file_upload']['description']="File uploads";
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        return $requirement;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['pcre']['description']="PCRE Extension";
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Avoid using undefined variables such as '$requirement' which will lead to PHP notices.
    Open

        $requirement['curl']['description']="CURL Extension";
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    UndefinedVariable

    Since: 2.8.0

    Detects when a variable is used that has not been defined before.

    Example

    class Foo
    {
        private function bar()
        {
            // $message is undefined
            echo $message;
        }
    }

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

    Remove error control operator '@' on line 57.
    Open

    function xoDiagIfWritable( $path) {
        $path = "../" . $path;
        $error = true;
        if (!is_dir( $path )) {
            if (file_exists( $path )) {
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

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

    Remove error control operator '@' on line 61.
    Open

    function xoDiagIfWritable( $path) {
        $path = "../" . $path;
        $error = true;
        if (!is_dir( $path )) {
            if (file_exists( $path )) {
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

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

    The method xoDiagBoolSetting has a boolean flag argument $wanted, which is a certain sign of a Single Responsibility Principle violation.
    Open

    function xoDiagBoolSetting( $name, $wanted = false, $severe = false) {
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

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

    The method xoDiagBoolSetting has a boolean flag argument $severe, which is a certain sign of a Single Responsibility Principle violation.
    Open

    function xoDiagBoolSetting( $name, $wanted = false, $severe = false) {
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

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

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

        } else {
            $requirement['php_version']['status']=0;
        }
    Severity: Minor
    Found in htdocs/install/page_modcheck.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 xoDiagIfWritable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
            @chmod( $path, 0777 );
            $error = !is_writeable( $path );
        }
    Severity: Minor
    Found in htdocs/install/page_modcheck.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 xoDiagBoolSetting uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
            return xoDiag( $severe ? -1 : 0, $setting ? 'ON' : 'OFF' );
        }
    Severity: Minor
    Found in htdocs/install/page_modcheck.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 using static access to class 'PDO' in method 'imCheckRequirements'.
    Open

        $requirement['mysql']['result']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? SUCCESS : FAILED;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

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

    Avoid using static access to class 'PDO' in method 'imCheckRequirements'.
    Open

        $requirement['mysql']['status']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? true : false;
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

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

    Variable $requirement was undeclared, but array fields are being added to it.
    Open

        $requirement['server_api']['description']=PHP_SAPI;
    Severity: Info
    Found in htdocs/install/page_modcheck.php by phan

    Variable $wizard is undeclared
    Open

    $wizard->setPage( 'modcheck' );
    Severity: Minor
    Found in htdocs/install/page_modcheck.php by phan

    Expected 0 spaces between opening bracket and argument "$path"; 1 found
    Open

    function xoDiagIfWritable( $path) {

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (extension_loaded( 'xml' ) )        $ext[] = 'XML';

    Space found after opening bracket of FOREACH loop
    Open

            foreach ( $paths as $path) {

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (!defined( 'XOOPS_INSTALL' ) )    exit();

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

    {

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

        $requirement['mysql']['result']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? SUCCESS : FAILED;

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

        </thead>

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

        <thead>

    Expected 0 spaces between opening bracket and argument "$status"; 1 found
    Open

    function xoDiag( $status = -1, $str = '') {

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (extension_loaded( 'mb_string' ) )    $ext[] = 'MBString';

    Expected 0 spaces between opening bracket and argument "$name"; 1 found
    Open

    function xoDiagBoolSetting( $name, $wanted = false, $severe = false) {

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (extension_loaded( 'iconv' ) )        $ext[] = 'Iconv';

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

            <tr><th>Path</th><th>Status</th></tr>

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

        $requirement['mysql']['status']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? true : false;

    Inline control structures are not allowed
    Open

    if (extension_loaded( 'iconv' ) )        $ext[] = 'Iconv';

    Inline control structures are not allowed
    Open

    if (extension_loaded( 'mb_string' ) )    $ext[] = 'MBString';

    Inline control structures are not allowed
    Open

    if (extension_loaded( 'xml' ) )        $ext[] = 'XML';

    Inline control structures are not allowed
    Open

    if (!defined( 'XOOPS_INSTALL' ) )    exit();

    Expected 0 spaces before closing bracket; 1 found
    Open

    $wizard->setPage( 'modcheck' );

    Expected 0 spaces before closing bracket; 1 found
    Open

        $setting = ( empty( $setting ) || $setting == 'off' || $setting == 'false' ) ? false : true;

    Expected 0 spaces before closing bracket; 1 found
    Open

        if (!is_dir( $path )) {

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['curl']['status']=extension_loaded( 'curl' ) ? true : false;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['gd']['result']=extension_loaded( 'GD' ) ? SUCCESS : FAILED;

    Expected 0 spaces before closing bracket; 1 found
    Open

        echo xoDiag( 0, NONE );

    Space after opening parenthesis of function call prohibited
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

        $setting = strtolower( ini_get( $name ) );

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['pcre']['status']=extension_loaded( 'PCRE' ) ? true : false;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['curl']['result']=extension_loaded( 'curl' ) ? SUCCESS : FAILED;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['curl']['status']=extension_loaded( 'curl' ) ? true : false;

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['file_upload']['result']=xoDiagBoolSetting( 'file_uploads', true ) ? SUCCESS : FAILED;

    Expected 0 spaces before closing bracket; 1 found
    Open

            @chmod( $path, 0777 );

    Space after opening parenthesis of function call prohibited
    Open

            $error = !is_writeable( $path );

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['session']['status']=extension_loaded( 'session' ) ? true : false;

    Space after opening parenthesis of function call prohibited
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Closing brace indented incorrectly; expected 8 spaces, found 4
    Open

        <?php } ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

            return xoDiag( 1, $setting ? 'ON' : 'OFF' );

    No space found after comma in function call
    Open

        $requirement['mysql']['result']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? SUCCESS : FAILED;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['session']['result']=extension_loaded( 'session' ) ? SUCCESS : FAILED;

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['pcre']['result']=extension_loaded( 'PCRE' ) ? SUCCESS : FAILED;

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['gd']['result']=extension_loaded( 'GD' ) ? SUCCESS : FAILED;

    Space after opening parenthesis of function call prohibited
    Open

    if (extension_loaded( 'mb_string' ) )    $ext[] = 'MBString';

    Expected 0 spaces before closing bracket; 1 found
    Open

    <h4><?php printf( PHP_EXTENSION, XML_PARSING ); ?>:&nbsp; <?php

    Expected 0 spaces before closing bracket; 1 found
    Open

        echo xoDiag( 0, NONE );

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (!defined( 'XOOPS_INSTALL' ) )    exit();

    Space after opening parenthesis of function call prohibited
    Open

            return xoDiag( $severe ? -1 : 0, $setting ? 'ON' : 'OFF' );

    Space after opening parenthesis of function call prohibited
    Open

                @chmod( $path, 0666 );

    Expected 0 spaces before closing bracket; 1 found
    Open

                @chmod( $path, 0666 );

    No space found after comma in function call
    Open

        $requirement['mysql']['status']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? true : false;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['session']['status']=extension_loaded( 'session' ) ? true : false;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['pcre']['result']=extension_loaded( 'PCRE' ) ? SUCCESS : FAILED;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['gd']['status']=extension_loaded( 'GD' ) ? true : false;

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['file_upload']['status']=xoDiagBoolSetting( 'file_uploads', true ) ? true : false;

    Closing brace indented incorrectly; expected 0 spaces, found 9
    Open

             <?php } ?>

    Line indented incorrectly; expected 3 tabs, found 2
    Open

             <?php } ?>

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (extension_loaded( 'mb_string' ) )    $ext[] = 'MBString';

    Expected 0 spaces before closing bracket; 1 found
    Open

            if (file_exists( $path )) {

    Expected 1 space after FOREACH keyword; 0 found
    Open

    <?php foreach($requirements_array as &$requirement)

    Space after opening parenthesis of function call prohibited
    Open

    if (!defined( 'XOOPS_INSTALL' ) )    exit();

    Space after opening parenthesis of function call prohibited
    Open

    $wizard->setPage( 'modcheck' );

    Space after opening parenthesis of function call prohibited
    Open

        if (!is_dir( $path )) {

    Expected 0 spaces before closing bracket; 1 found
    Open

                $error = !is_writeable( $path );

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (extension_loaded( 'iconv' ) )        $ext[] = 'Iconv';

    Expected 0 spaces before closing bracket; 1 found
    Open

    if (extension_loaded( 'xml' ) )        $ext[] = 'XML';

    Expected 0 spaces before closing bracket; 1 found
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['session']['result']=extension_loaded( 'session' ) ? SUCCESS : FAILED;

    Expected 1 space after closing parenthesis; found 6
    Open

    <?php foreach($requirements_array as &$requirement)

    Space after opening parenthesis of function call prohibited
    Open

    <h4><?php printf( PHP_EXTENSION, CHAR_ENCODING ); ?>:&nbsp; <?php

    Expected 0 spaces before closing bracket; 1 found
    Open

            <td><?php echo xoDiagIfWritable( $path ); ?></td>

    Space after opening parenthesis of function call prohibited
    Open

        $setting = strtolower( ini_get( $name ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

        $setting = strtolower( ini_get( $name ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

    <h4><?php printf( PHP_EXTENSION, CHAR_ENCODING ); ?>:&nbsp; <?php

    Space after opening parenthesis of function call prohibited
    Open

    if (extension_loaded( 'iconv' ) )        $ext[] = 'Iconv';

    Space after opening parenthesis of function call prohibited
    Open

            return xoDiag( 1, $setting ? 'ON' : 'OFF' );

    Expected 0 spaces before closing bracket; 1 found
    Open

        return xoDiag( $error ? -1 : 1, $error ? 'Not writable' : 'Writable' );

    Space after opening parenthesis of function call prohibited
    Open

        if (version_compare( phpversion(), '7.0', '>=')) {

    No space found after comma in function call
    Open

        $requirement['mysql']['result']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? SUCCESS : FAILED;

    Space after opening parenthesis of function call prohibited
    Open

        echo xoDiag( 0, NONE );

    Expected 0 spaces before closing bracket; 1 found
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Line indented incorrectly; expected 1 tabs, found 2
    Open

            foreach ( $paths as $path) {

    Space after opening parenthesis of function call prohibited
    Open

            <td><?php echo xoDiagIfWritable( $path ); ?></td>

    Space after opening parenthesis of function call prohibited
    Open

        $setting = ( empty( $setting ) || $setting == 'off' || $setting == 'false' ) ? false : true;

    Space after opening parenthesis of function call prohibited
    Open

                $error = !is_writeable( $path );

    Expected 0 spaces before closing bracket; 1 found
    Open

            $error = !is_writeable( $path );

    No space found after comma in function call
    Open

        $requirement['mysql']['status']=in_array("mysql",PDO::getAvailableDrivers(),TRUE) ? true : false;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['pcre']['status']=extension_loaded( 'PCRE' ) ? true : false;

    Space after opening parenthesis of function call prohibited
    Open

    if (extension_loaded( 'xml' ) )        $ext[] = 'XML';

    Space after opening parenthesis of function call prohibited
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Space after opening parenthesis of function call prohibited
    Open

        $setting = strtolower( ini_get( $name ) );

    Expected 0 spaces before closing bracket; 1 found
    Open

            return xoDiag( $severe ? -1 : 0, $setting ? 'ON' : 'OFF' );

    Expected 0 spaces before closing bracket; 1 found
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Space after opening parenthesis of function call prohibited
    Open

            if (file_exists( $path )) {

    Space after opening parenthesis of function call prohibited
    Open

    <h4><?php printf( PHP_EXTENSION, XML_PARSING ); ?>:&nbsp; <?php

    Space after opening parenthesis of function call prohibited
    Open

        echo xoDiag( 1, implode( ',', $ext ) );

    Expected 0 spaces after opening bracket; 1 found
    Open

            foreach ( $paths as $path) {

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['file_upload']['status']=xoDiagBoolSetting( 'file_uploads', true ) ? true : false;

    Space after opening parenthesis of function call prohibited
    Open

        echo xoDiag( 0, NONE );

    Space after opening parenthesis of function call prohibited
    Open

            @chmod( $path, 0777 );

    Space after opening parenthesis of function call prohibited
    Open

        return xoDiag( $error ? -1 : 1, $error ? 'Not writable' : 'Writable' );

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['curl']['result']=extension_loaded( 'curl' ) ? SUCCESS : FAILED;

    Expected 0 spaces before closing bracket; 1 found
    Open

        $requirement['file_upload']['result']=xoDiagBoolSetting( 'file_uploads', true ) ? SUCCESS : FAILED;

    Space after opening parenthesis of function call prohibited
    Open

        $requirement['gd']['status']=extension_loaded( 'GD' ) ? true : false;

    Line indented incorrectly; expected 2 tabs, found 1
    Open

         ?>

    Unexpected spaces found.
    Open

             <?php } ?>

    Unexpected spaces found.
    Open

         {

    Unexpected spaces found.
    Open

         ?>

    Unexpected trailing spaces found.
    Open

        

    Unexpected trailing spaces found.
    Open

        

    There are no issues that match your filters.

    Category
    Status