ImpressCMS/impresscms

View on GitHub
htdocs/install/page_pathsettings.php

Summary

Maintainability
C
1 day
Test Coverage

execute accesses the super-global variable $_SERVER.
Open

    function execute() {
        $this->readRequest();
        $valid = $this->validate();
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $_SESSION['settings']['ROOT_PATH'] = $this->xoopsRootPath;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

readRequest accesses the super-global variable $_SERVER.
Open

    function readRequest() {
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $request = $_POST;
            /*
             $request = xo_input_get_args( INPUT_POST, array(
Severity: Minor
Found in htdocs/install/page_pathsettings.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

execute accesses the super-global variable $_SESSION.
Open

    function execute() {
        $this->readRequest();
        $valid = $this->validate();
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $_SESSION['settings']['ROOT_PATH'] = $this->xoopsRootPath;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

createTrustPath accesses the super-global variable $_SESSION.
Open

    function createTrustPath() {
        if (@icms_core_Filesystem::mkdir($this->xoopsTrustPath, 0777, '', array('[', '?', '"', '<', '>', '|', ' ' ))) {
            if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {
                $_SESSION['settings']['TRUST_PATH'] = $this->xoopsTrustPath;
                return $this->validTrustPath = true;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

resolveDocumentRoot accesses the super-global variable $_SERVER.
Open

function resolveDocumentRoot() {
    $current_script = dirname($_SERVER['SCRIPT_NAME']);
    $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);

    /* work out how many folders we are away from document_root
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $_SESSION.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

readRequest accesses the super-global variable $_POST.
Open

    function readRequest() {
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $request = $_POST;
            /*
             $request = xo_input_get_args( INPUT_POST, array(
Severity: Minor
Found in htdocs/install/page_pathsettings.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

execute accesses the super-global variable $_SESSION.
Open

    function execute() {
        $this->readRequest();
        $valid = $this->validate();
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $_SESSION['settings']['ROOT_PATH'] = $this->xoopsRootPath;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

execute accesses the super-global variable $GLOBALS.
Open

    function execute() {
        $this->readRequest();
        $valid = $this->validate();
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $_SESSION['settings']['ROOT_PATH'] = $this->xoopsRootPath;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

execute accesses the super-global variable $_SESSION.
Open

    function execute() {
        $this->readRequest();
        $valid = $this->validate();
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $_SESSION['settings']['ROOT_PATH'] = $this->xoopsRootPath;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $_SESSION.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $GLOBALS.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $_SESSION.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

resolveDocumentRoot accesses the super-global variable $_SERVER.
Open

function resolveDocumentRoot() {
    $current_script = dirname($_SERVER['SCRIPT_NAME']);
    $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);

    /* work out how many folders we are away from document_root
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $_SESSION.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $_SESSION.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

__construct accesses the super-global variable $_SESSION.
Open

    function __construct() {
        if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
            $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
        } else {
            $path = str_replace( "\\", "/", @realpath( '../' ) );
Severity: Minor
Found in htdocs/install/page_pathsettings.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

execute accesses the super-global variable $GLOBALS.
Open

    function execute() {
        $this->readRequest();
        $valid = $this->validate();
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $_SESSION['settings']['ROOT_PATH'] = $this->xoopsRootPath;
Severity: Minor
Found in htdocs/install/page_pathsettings.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

The class PathStuffController has 11 public methods. Consider refactoring PathStuffController to keep number of public methods under 10.
Open

class PathStuffController {
    var $xoopsRootPath = '';
    var $xoopsTrustPath = '';
    var $xoopsUrl = '';

Severity: Minor
Found in htdocs/install/page_pathsettings.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class PathStuffController has an overall complexity of 53 which is very high. The configured complexity threshold is 50.
Open

class PathStuffController {
    var $xoopsRootPath = '';
    var $xoopsTrustPath = '';
    var $xoopsUrl = '';

Severity: Minor
Found in htdocs/install/page_pathsettings.php by phpmd

File page_pathsettings.php has 295 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Installer paths configuration page
 *
 * See the enclosed file license.txt for licensing information.
Severity: Minor
Found in htdocs/install/page_pathsettings.php - About 3 hrs to fix

    Function readRequest has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        function readRequest() {
            if ($_SERVER['REQUEST_METHOD'] == 'POST') {
                $request = $_POST;
                /*
                 $request = xo_input_get_args( INPUT_POST, array(
    Severity: Minor
    Found in htdocs/install/page_pathsettings.php - About 2 hrs 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 makeWritable has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        function makeWritable( $path, $group = false, $recurse = false) {
            if (!file_exists( $path )) {
                return false;
            }
            $perm = @is_dir( $path ) ? 6 : 7;
    Severity: Minor
    Found in htdocs/install/page_pathsettings.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

    Function __construct has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        function __construct() {
            if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
            } else {
                $path = str_replace( "\\", "/", @realpath( '../' ) );
    Severity: Minor
    Found in htdocs/install/page_pathsettings.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 makeWritable has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function makeWritable( $path, $group = false, $recurse = false) {
            if (!file_exists( $path )) {
                return false;
            }
            $perm = @is_dir( $path ) ? 6 : 7;
    Severity: Minor
    Found in htdocs/install/page_pathsettings.php - About 1 hr to fix

      Method __construct has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function __construct() {
              if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                  $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
              } else {
                  $path = str_replace( "\\", "/", @realpath( '../' ) );
      Severity: Minor
      Found in htdocs/install/page_pathsettings.php - About 1 hr to fix

        Avoid too many return statements within this method.
        Open

                return false;
        Severity: Major
        Found in htdocs/install/page_pathsettings.php - About 30 mins to fix

          The method makeWritable() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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

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

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 212.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 157.
          Open

              function createTrustPath() {
                  if (@icms_core_Filesystem::mkdir($this->xoopsTrustPath, 0777, '', array('[', '?', '"', '<', '>', '|', ' ' ))) {
                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {
                          $_SESSION['settings']['TRUST_PATH'] = $this->xoopsTrustPath;
                          return $this->validTrustPath = true;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 43.
          Open

              function __construct() {
                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                      $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
                  } else {
                      $path = str_replace( "\\", "/", @realpath( '../' ) );
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 149.
          Open

              function checkTrustPath() {
                  if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {
                      return $this->validTrustPath = true;
                  }
                  return $this->validTrustPath = false;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 makeWritable has a boolean flag argument $recurse, which is a certain sign of a Single Responsibility Principle violation.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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

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

              function checkRootPath() {
                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {
                      @include_once "$this->xoopsRootPath/include/version.php";
                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {
                          return $this->validRootPath = true;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 makeWritable has a boolean flag argument $group, which is a certain sign of a Single Responsibility Principle violation.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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

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

              function checkRootPath() {
                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {
                      @include_once "$this->xoopsRootPath/include/version.php";
                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {
                          return $this->validRootPath = true;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 208.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 157.
          Open

              function createTrustPath() {
                  if (@icms_core_Filesystem::mkdir($this->xoopsTrustPath, 0777, '', array('[', '?', '"', '<', '>', '|', ' ' ))) {
                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {
                          $_SESSION['settings']['TRUST_PATH'] = $this->xoopsTrustPath;
                          return $this->validTrustPath = true;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 203.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 205.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 211.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 216.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 149.
          Open

              function checkTrustPath() {
                  if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {
                      return $this->validTrustPath = true;
                  }
                  return $this->validTrustPath = false;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 156.
          Open

              function createTrustPath() {
                  if (@icms_core_Filesystem::mkdir($this->xoopsTrustPath, 0777, '', array('[', '?', '"', '<', '>', '|', ' ' ))) {
                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {
                          $_SESSION['settings']['TRUST_PATH'] = $this->xoopsTrustPath;
                          return $this->validTrustPath = true;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 262.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 136.
          Open

              function checkRootPath() {
                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {
                      @include_once "$this->xoopsRootPath/include/version.php";
                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {
                          return $this->validRootPath = true;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 201.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 207.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
                  if (!file_exists( $path )) {
                      return false;
                  }
                  $perm = @is_dir( $path ) ? 6 : 7;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                      } else {
                          $GLOBALS['wizard']->redirectToPage( '+0' );
                      }
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 genTrustPathCheckHtml uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

              }  else {
                  return '<img src="img/no.png" alt="Error" class="rootimg" />' . _INSTALL_ERR_NO_TRUST_PATH_FOUND;
              }
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 genRootCheckHtml uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

              }  else {
                  return '<img src="img/no.png" alt="Error" class="rootimg" />' .ERR_NO_XOOPS_FOUND;
              }
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 'icms_core_Filesystem' in method 'createTrustPath'.
          Open

                  if (@icms_core_Filesystem::mkdir($this->xoopsTrustPath, 0777, '', array('[', '?', '"', '<', '>', '|', ' ' ))) {
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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

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

                  } else {
                      $path = str_replace( "\\", "/", @realpath( '../' ) );
                      if (file_exists( "$path/mainfile.php" )) {
                          $this->xoopsRootPath = $path;
                      }
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $web_root = dirname( $this->xoopsRootPath );
                      $arr = explode('/',$web_root);
                      $web_root = '';
                      for ($i = 0; $i < count($arr)-1; $i++) {
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $path = $GLOBALS['wizard']->baseLocation();
                      $this->xoopsUrl = substr( $path, 0, strrpos( $path, '/' ) );
                  }
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 unused parameters such as '$recurse'.
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phpmd

          UnusedFormalParameter

          Since: 0.2

          Avoid passing parameters to methods or constructors and then not using those parameters.

          Example

          class Foo
          {
              private function bar($howdy)
              {
                  // $howdy is not used
              }
          }

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

          Avoid using count() function in for loops.
          Open

                      for ($i = 0; $i < count($arr)-1; $i++) {
                          $web_root .= $arr[$i].'/';
                      }
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phpmd

          CountInLoopExpression

          Since: 2.7.0

          Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.

          Example

          class Foo {
          
            public function bar()
            {
              $array = array();
          
              for ($i = 0; count($array); $i++) {
                // ...
              }
            }
          }

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

          Returning type false but findServerGID() is declared to return int
          Open

                  return false;
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

          Suspicious argument void for an echo/print statement
          Open

              echo genCreateTrustPathHtml( $ctrl->createTrustPath() );
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

          Default value for string $group can't be false
          Open

              function makeWritable( $path, $group = false, $recurse = false) {
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

          Returning type 'u' but makeWritable() is declared to return false
          Open

                      return 'u';
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

          Call to method mkdir from undeclared class \icms_core_Filesystem
          Open

                  if (@icms_core_Filesystem::mkdir($this->xoopsTrustPath, 0777, '', array('[', '?', '"', '<', '>', '|', ' ' ))) {
          Severity: Critical
          Found in htdocs/install/page_pathsettings.php by phan

          Returning type 'w' but makeWritable() is declared to return false
          Open

                          return 'w';
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

          Variable $wizard is undeclared
          Open

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

          Returning type 'g' but makeWritable() is declared to return false
          Open

                          return 'g';
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

          Argument 1 (str) is int but \md5() takes string
          Open

                      $this->xoopsTrustPath = $docroot . substr( md5( time() ), 0, 15);
          Severity: Minor
          Found in htdocs/install/page_pathsettings.php by phan

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

                      if (isset($request['ROOT_PATH'])) {
                          $request['ROOT_PATH'] = str_replace( "\\", "/", $request['ROOT_PATH'] );
                          if (substr( $request['ROOT_PATH'], -1 ) == '/') {
                              $request['ROOT_PATH'] = substr( $request['ROOT_PATH'], 0, -1 );
                          }
          Severity: Major
          Found in htdocs/install/page_pathsettings.php and 1 other location - About 1 hr to fix
          htdocs/install/page_pathsettings.php on lines 103..109

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

          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

                      if (isset($request['TRUST_PATH'])) {
                          $request['TRUST_PATH'] = str_replace( "\\", "/", $request['TRUST_PATH'] );
                          if (substr( $request['TRUST_PATH'], -1 ) == '/') {
                              $request['TRUST_PATH'] = substr( $request['TRUST_PATH'], 0, -1 );
                          }
          Severity: Major
          Found in htdocs/install/page_pathsettings.php and 1 other location - About 1 hr to fix
          htdocs/install/page_pathsettings.php on lines 96..102

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

          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

          Each class must be in a namespace of at least one level (a top-level vendor name)
          Open

          class PathStuffController {

          Visibility must be declared on property "$validTrustPath"
          Open

              var $validTrustPath = false;

          Visibility must be declared on property "$validUrl"
          Open

              var $validUrl = false;

          Visibility must be declared on property "$permErrors"
          Open

              var $permErrors = array();

          Visibility must be declared on method "execute"
          Open

              function execute() {

          The var keyword must not be used to declare a property
          Open

              var $validTrustPath = false;

          Visibility must be declared on method "checkTrustPathPermissions"
          Open

              function checkTrustPathPermissions() {

          The var keyword must not be used to declare a property
          Open

              var $xoopsRootPath = '';

          The var keyword must not be used to declare a property
          Open

              var $xoopsTrustPath = '';

          Visibility must be declared on property "$xoopsUrl"
          Open

              var $xoopsUrl = '';

          Visibility must be declared on method "validate"
          Open

              function validate() {

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

              function makeWritable( $path, $group = false, $recurse = false) {

          Expected 0 spaces before closing bracket; 1 found
          Open

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

          Visibility must be declared on method "checkRootPath"
          Open

              function checkRootPath() {

          Visibility must be declared on method "checkTrustPath"
          Open

              function checkTrustPath() {

          Visibility must be declared on method "checkPermissions"
          Open

              function checkPermissions() {

          Visibility must be declared on method "__construct"
          Open

              function __construct() {

          The var keyword must not be used to declare a property
          Open

              var $xoopsUrl = '';

          Visibility must be declared on method "createTrustPath"
          Open

              function createTrustPath() {

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

          function genTrustPathCheckHtml( $valid) {

          The var keyword must not be used to declare a property
          Open

              var $permErrors = array();

          The var keyword must not be used to declare a property
          Open

              var $validUrl = false;

          Visibility must be declared on method "readRequest"
          Open

              function readRequest() {

          The var keyword must not be used to declare a property
          Open

              var $validRootPath = false;

          Space found after opening bracket of FOREACH loop
          Open

                  foreach ( $paths as $path) {

          Visibility must be declared on property "$validRootPath"
          Open

              var $validRootPath = false;

          Visibility must be declared on property "$xoopsRootPath"
          Open

              var $xoopsRootPath = '';

          Visibility must be declared on property "$xoopsTrustPath"
          Open

              var $xoopsTrustPath = '';

          Visibility must be declared on method "findServerGID"
          Open

              function findServerGID() {

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

          function genRootCheckHtml( $valid) {

          Visibility must be declared on method "makeWritable"
          Open

              function makeWritable( $path, $group = false, $recurse = false) {

          Space found after opening bracket of FOREACH loop
          Open

          <?php foreach ( $ctrl->permErrors as $path => $result) {

          Inline control structures are not allowed
          Open

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

          Space after opening parenthesis of function call prohibited
          Open

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

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->xoopsTrustPath = $docroot . substr( md5( time() ), 0, 15);

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->xoopsUrl = substr( $path, 0, strrpos( $path, '/' ) );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->xoopsUrl = substr( $path, 0, strrpos( $path, '/' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $request['ROOT_PATH'] = str_replace( "\\", "/", $request['ROOT_PATH'] );

          Space after opening parenthesis of function call prohibited
          Open

                  return ( $this->validRootPath && $this->validTrustPath && $this->validUrl && empty( $this->permErrors ) );

          Space after opening parenthesis of function call prohibited
          Open

                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Space after opening parenthesis of function call prohibited
          Open

                      $web_root = dirname( $this->xoopsRootPath );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $web_root = dirname( $this->xoopsRootPath );

          Space after opening parenthesis of function call prohibited
          Open

                          $GLOBALS['wizard']->redirectToPage( '+0' );

          Space after opening parenthesis of function call prohibited
          Open

                  if (isset( $_SESSION['settings']['TRUST_PATH'] )) {

          Space after opening parenthesis of function call prohibited
          Open

                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {

          Space after opening parenthesis of function call prohibited
          Open

                      $this->xoopsTrustPath = $docroot . substr( md5( time() ), 0, 15);

          Space after opening parenthesis of function call prohibited
          Open

                      $this->xoopsUrl = substr( $path, 0, strrpos( $path, '/' ) );

          Space after opening parenthesis of function call prohibited
          Open

                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Space after opening parenthesis of function call prohibited
          Open

                          $request['TRUST_PATH'] = str_replace( "\\", "/", $request['TRUST_PATH'] );

          Expected 0 spaces after opening bracket; 1 found
          Open

                  foreach ( $paths as $path) {

          Space after opening parenthesis of function call prohibited
          Open

                      $path = str_replace( "\\", "/", @realpath( '../' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $errors['trustpath'] = $this->makeWritable( "$this->xoopsTrustPath" );

          No space found after comma in function call
          Open

                      $arr = explode('/',$web_root);

          Space after opening parenthesis of function call prohibited
          Open

                  $name = tempnam( '/non-existent/', 'XOOPS' );

          Space after opening parenthesis of function call prohibited
          Open

                          if (substr( $request['URL'], -1 ) == '/') {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if (substr( $request['URL'], -1 ) == '/') {

          Expected 0 spaces before closing bracket; 1 found
          Open

              echo genCreateTrustPathHtml( $ctrl->createTrustPath() );

          Space after opening parenthesis of function call prohibited
          Open

          $wizard->setPage( 'pathsettings' );

          Space after opening parenthesis of function call prohibited
          Open

                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (file_exists( "$path/mainfile.php" )) {

          Space after opening parenthesis of function call prohibited
          Open

                      if (isset( $request['URL'] )) {

          Space after opening parenthesis of function call prohibited
          Open

                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Space after opening parenthesis of function call prohibited
          Open

                              $request['TRUST_PATH'] = substr( $request['TRUST_PATH'], 0, -1 );

          Space after opening parenthesis of function call prohibited
          Open

                              $request['URL'] = substr( $request['URL'], 0, -1 );

          Space after opening parenthesis of function call prohibited
          Open

                          $request['ROOT_PATH'] = str_replace( "\\", "/", $request['ROOT_PATH'] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $request['TRUST_PATH'] = str_replace( "\\", "/", $request['TRUST_PATH'] );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  return ( $this->validRootPath && $this->validTrustPath && $this->validUrl && empty( $this->permErrors ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      @chmod( $path, octdec( '0' . $perm . '00' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

          $wizard->setPage( 'pathsettings' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $path = str_replace( "\\", "/", @realpath( '../' ) );

          Space after opening parenthesis of function call prohibited
          Open

                      if (file_exists( "$path/mainfile.php" )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $request['ROOT_PATH'] = substr( $request['ROOT_PATH'], 0, -1 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {

          Space after opening parenthesis of function call prohibited
          Open

                          if (substr( $request['ROOT_PATH'], -1 ) == '/') {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if (substr( $request['ROOT_PATH'], -1 ) == '/') {

          Space after opening parenthesis of function call prohibited
          Open

                  $errors['trustpath'] = $this->makeWritable( "$this->xoopsTrustPath" );

          Space after opening parenthesis of function call prohibited
          Open

                  if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (!file_exists( $path )) {

          Space after opening parenthesis of function call prohibited
          Open

                  $perm = @is_dir( $path ) ? 6 : 7;

          Expected 0 spaces before closing bracket; 1 found
          Open

                          @chgrp( $path, $group );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (@is_writable( $path )) {

          Space after opening parenthesis of function call prohibited
          Open

                          $group = filegroup( $name );

          No space found after comma in function call
          Open

              $rootp = str_replace("\\","/",$rootp);

          Space after opening parenthesis of function call prohibited
          Open

                  return '<img src="img/yes.png" alt="Success" class="rootimg" />' .  sprintf( XOOPS_FOUND, XOOPS_VERSION);

          Expected 1 space after closing brace; 2 found
          Open

              }  else {

          Space after opening parenthesis of function call prohibited
          Open

                  echo '<li class="failure">' . sprintf( IS_NOT_WRITABLE, $path ) . '</li>';

          Expected 0 spaces before closing bracket; 1 found
          Open

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

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {

          Space after opening parenthesis of function call prohibited
          Open

                          $GLOBALS['wizard']->redirectToPage( '+1' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $path = str_replace( "\\", "/", @realpath( '../' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $GLOBALS['wizard']->redirectToPage( '+1' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $request['URL'] = substr( $request['URL'], 0, -1 );

          Space after opening parenthesis of function call prohibited
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . '0' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $GLOBALS['wizard']->redirectToPage( '+0' );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          $group = filegroup( $name );

          Space after opening parenthesis of function call prohibited
          Open

                          unlink( $name );

          No space found after comma in function call
          Open

              $lastchar = substr($rootp,strlen($rootp)-1,1);

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  echo '<li class="success">' . sprintf( IS_WRITABLE, $path ) . '</li>';

          Space after opening parenthesis of function call prohibited
          Open

                  if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (in_array( false, $errors )) {

          Space after opening parenthesis of function call prohibited
          Open

                          @chgrp( $path, $group );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . $perm ) );

          No space found after comma in function call
          Open

              $rootp = str_replace("\\","/",$rootp);

          Space after opening parenthesis of function call prohibited
          Open

                  echo '<li class="success">' . sprintf( IS_WRITABLE, $path ) . '</li>';

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (isset( $_SESSION['settings']['URL'] )) {

          Space after opening parenthesis of function call prohibited
          Open

                              $request['ROOT_PATH'] = substr( $request['ROOT_PATH'], 0, -1 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          if (substr( $request['TRUST_PATH'], -1 ) == '/') {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . '0' ) );

          Space after opening parenthesis of function call prohibited
          Open

                      $errors[$path] = $this->makeWritable( "$this->xoopsRootPath/$path" );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $perm = @is_dir( $path ) ? 6 : 7;

          Expected 0 spaces before closing bracket; 1 found
          Open

                      @chmod( $path, octdec( '0' . $perm . '00' ) );

          Space after opening parenthesis of function call prohibited
          Open

                      if (!@is_writable( $path )) {

          Space after opening parenthesis of function call prohibited
          Open

                  if (@is_writable( $path )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                          unlink( $name );

          Space after opening parenthesis of function call prohibited
          Open

                      $this->xoopsTrustPath = $docroot . substr( md5( time() ), 0, 15);

          Space after opening parenthesis of function call prohibited
          Open

                          if (substr( $request['TRUST_PATH'], -1 ) == '/') {

          Expected 0 spaces before closing bracket; 1 found
          Open

                              $request['TRUST_PATH'] = substr( $request['TRUST_PATH'], 0, -1 );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $errors[$path] = $this->makeWritable( "$this->xoopsRootPath/$path" );

          Space after opening parenthesis of function call prohibited
          Open

                      $info = stat( $path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $info = stat( $path );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  $name = tempnam( '/non-existent/', 'XOOPS' );

          Space after opening parenthesis of function call prohibited
          Open

                      if (touch( $name )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (touch( $name )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (in_array( false, $errors )) {

          Space after opening parenthesis of function call prohibited
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . $perm ) );

          Expected 1 space after closing brace; 2 found
          Open

              }  else {

          Expected 0 spaces before closing bracket; 1 found
          Open

              echo genRootCheckHtml( $ctrl->checkRootPath() );

          Expected 0 spaces before closing bracket; 1 found
          Open

              echo genTrustPathCheckHtml( $ctrl->checkTrustPath() );

          Space after opening parenthesis of function call prohibited
          Open

              value="<?php echo $ctrl->xoopsRootPath; ?>" /> <span id="rootpathimg"><?php echo genRootCheckHtml( $ctrl->validRootPath ); ?></span>

          Expected 0 spaces before closing bracket; 1 found
          Open

          <?php if ($ctrl->validRootPath && !empty( $ctrl->permErrors )) { ?>

          Closing brace must be on a line by itself
          Open

          <?php } else { echo '<div id="rootperms">'.CHECKING_PERMISSIONS .'<br /><ul class="diags"><li class="success">'.ALL_PERM_OK.'</li></ul></div>';} ?>

          Expected 0 spaces before closing bracket; 1 found
          Open

                      $this->xoopsUrl = substr( $path, 0, strrpos( $path, '/' ) );

          Space after opening parenthesis of function call prohibited
          Open

                  if (@is_dir( $this->xoopsRootPath ) && @is_readable( $this->xoopsRootPath )) {

          Space after opening parenthesis of function call prohibited
          Open

                      if (@is_dir( $this->xoopsTrustPath ) && @is_readable( $this->xoopsTrustPath )) {

          No space found after comma in function call
          Open

              $lastchar = substr($rootp,strlen($rootp)-1,1);

          Space after opening parenthesis of function call prohibited
          Open

          <?php if ($ctrl->validRootPath && !empty( $ctrl->permErrors )) { ?>

          Space after opening parenthesis of function call prohibited
          Open

                      $path = str_replace( "\\", "/", @realpath( '../' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                  if (isset( $_SESSION['settings']['TRUST_PATH'] )) {

          Space after opening parenthesis of function call prohibited
          Open

                  if (isset( $_SESSION['settings']['URL'] )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (isset( $request['URL'] )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (file_exists( "$this->xoopsRootPath/mainfile.php" ) && defined( 'XOOPS_VERSION' )) {

          Space after opening parenthesis of function call prohibited
          Open

                  if (in_array( false, $errors )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                  echo '<li class="failure">' . sprintf( IS_NOT_WRITABLE, $path ) . '</li>';

          Space after opening parenthesis of function call prohibited
          Open

              value="<?php echo $ctrl->xoopsTrustPath; ?>" /> <span id="trustpathimg"><?php echo genTrustPathCheckHtml( $ctrl->validTrustPath ); ?></span>

          Expected 0 spaces before closing bracket; 1 found
          Open

              value="<?php echo $ctrl->xoopsTrustPath; ?>" /> <span id="trustpathimg"><?php echo genTrustPathCheckHtml( $ctrl->validTrustPath ); ?></span>

          Space after opening parenthesis of function call prohibited
          Open

              echo genCreateTrustPathHtml( $ctrl->createTrustPath() );

          Expected 0 spaces before closing bracket; 1 found
          Open

              value="<?php echo $ctrl->xoopsRootPath; ?>" /> <span id="rootpathimg"><?php echo genRootCheckHtml( $ctrl->validRootPath ); ?></span>

          Space after opening parenthesis of function call prohibited
          Open

                  if (in_array( false, $errors )) {

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (!@is_writable( $path )) {

          Space after opening parenthesis of function call prohibited
          Open

                      @chmod( $path, octdec( '0' . $perm . '00' ) );

          Space after opening parenthesis of function call prohibited
          Open

                      if (!@is_writable( $path ) && $group !== false) {

          Space after opening parenthesis of function call prohibited
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . '0' ) );

          Space after opening parenthesis of function call prohibited
          Open

              echo genRootCheckHtml( $ctrl->checkRootPath() );

          Expected 0 spaces before closing bracket; 1 found
          Open

                      if (!@is_writable( $path ) && $group !== false) {

          Expected 0 spaces after opening bracket; 1 found
          Open

          <?php foreach ( $ctrl->permErrors as $path => $result) {

          Space after opening parenthesis of function call prohibited
          Open

                      @chmod( $path, octdec( '0' . $perm . '00' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . '0' ) );

          Expected 0 spaces before closing bracket; 1 found
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . $perm ) );

          Space after opening parenthesis of function call prohibited
          Open

              echo genTrustPathCheckHtml( $ctrl->checkTrustPath() );

          Newline required after opening brace
          Open

          <?php } else { echo '<div id="rootperms">'.CHECKING_PERMISSIONS .'<br /><ul class="diags"><li class="success">'.ALL_PERM_OK.'</li></ul></div>';} ?>

          Space after opening parenthesis of function call prohibited
          Open

                  if (!file_exists( $path )) {

          Space after opening parenthesis of function call prohibited
          Open

                          @chmod( $path, octdec( '0' . $perm . $perm . $perm ) );

          The variable $web_root is not named in camelCase.
          Open

              function __construct() {
                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                      $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
                  } else {
                      $path = str_replace( "\\", "/", @realpath( '../' ) );
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $current_path is not named in camelCase.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $web_root is not named in camelCase.
          Open

              function __construct() {
                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                      $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
                  } else {
                      $path = str_replace( "\\", "/", @realpath( '../' ) );
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $current_script is not named in camelCase.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $web_root is not named in camelCase.
          Open

              function __construct() {
                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                      $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
                  } else {
                      $path = str_replace( "\\", "/", @realpath( '../' ) );
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $web_root is not named in camelCase.
          Open

              function __construct() {
                  if (isset( $_SESSION['settings']['ROOT_PATH'] )) {
                      $this->xoopsRootPath = $_SESSION['settings']['ROOT_PATH'];
                  } else {
                      $path = str_replace( "\\", "/", @realpath( '../' ) );
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $adjusted_path is not named in camelCase.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $adjusted_path is not named in camelCase.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $current_script is not named in camelCase.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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 $current_path is not named in camelCase.
          Open

          function resolveDocumentRoot() {
              $current_script = dirname($_SERVER['SCRIPT_NAME']);
              $current_path   = dirname($_SERVER['SCRIPT_FILENAME']);
          
              /* work out how many folders we are away from document_root
          Severity: Minor
          Found in htdocs/install/page_pathsettings.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

          There are no issues that match your filters.

          Category
          Status