railpage/railpagecore

View on GitHub
lib/Session.php

Summary

Maintainability
D
2 days
Test Coverage

The class Session has 12 public methods. Consider refactoring Session to keep number of public methods under 10.
Open

    class Session implements SessionHandlerInterface {
        
        /**
         * Default session length
         * @since Version 3.10.0
Severity: Minor
Found in lib/Session.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

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

        public function __construct() {
            
            $this->Memcached = new Memcached;
            
            if (!defined("RP_SITE_DOMAIN")) {
Severity: Minor
Found in lib/Session.php - About 1 hr to fix

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

            public function __construct() {
                
                $this->Memcached = new Memcached;
                
                if (!defined("RP_SITE_DOMAIN")) {
    Severity: Minor
    Found in lib/Session.php - About 55 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    The method __construct() has an NPath complexity of 648. The configured NPath complexity threshold is 200.
    Open

            public function __construct() {
                
                $this->Memcached = new Memcached;
                
                if (!defined("RP_SITE_DOMAIN")) {
    Severity: Minor
    Found in lib/Session.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 method __construct() has 105 lines of code. Current threshold is set to 100. Avoid really long methods.
    Open

            public function __construct() {
                
                $this->Memcached = new Memcached;
                
                if (!defined("RP_SITE_DOMAIN")) {
    Severity: Minor
    Found in lib/Session.php by phpmd

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

            public function __construct() {
                
                $this->Memcached = new Memcached;
                
                if (!defined("RP_SITE_DOMAIN")) {
    Severity: Minor
    Found in lib/Session.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

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

            public function success($message = false) {
    Severity: Minor
    Found in lib/Session.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 message has a boolean flag argument $message, which is a certain sign of a Single Responsibility Principle violation.
    Open

            public function message($message = false) {
    Severity: Minor
    Found in lib/Session.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 error has a boolean flag argument $message, which is a certain sign of a Single Responsibility Principle violation.
    Open

            public function error($message = false) {
    Severity: Minor
    Found in lib/Session.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

    Avoid unused parameters such as '$save_path'.
    Open

            public function open($save_path, $name) {
    Severity: Minor
    Found in lib/Session.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 unused parameters such as '$name'.
    Open

            public function open($save_path, $name) {
    Severity: Minor
    Found in lib/Session.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 unused parameters such as '$maxlifetime'.
    Open

            public function gc($maxlifetime) {
    Severity: Minor
    Found in lib/Session.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

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

            public function error($message = false) {
                if (!isset($_SESSION['error'])) {
                    $_SESSION['error'] = array();
                }
                
    Severity: Major
    Found in lib/Session.php and 1 other location - About 4 hrs to fix
    lib/Session.php on lines 188..200

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

    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

            public function success($message = false) {
                if (!isset($_SESSION['message'])) {
                    $_SESSION['message'] = array();
                }
                
    Severity: Major
    Found in lib/Session.php and 1 other location - About 4 hrs to fix
    lib/Session.php on lines 209..221

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

    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

                $host['primary']['addr'] = (isset($Config->Memcached->host) && !empty($Config->Memcached->host)) ? $Config->Memcached->host : "cache.railpage.com.au";
    Severity: Major
    Found in lib/Session.php and 1 other location - About 1 hr to fix
    lib/Session.php on lines 81..81

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

    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

                $host['primary']['port'] = (isset($Config->Memcached->port) && !empty($Config->Memcached->port)) ? $Config->Memcached->host : "11211";
    Severity: Major
    Found in lib/Session.php and 1 other location - About 1 hr to fix
    lib/Session.php on lines 80..80

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

    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

            public function destroy($session_id) {
                return $this->Memcached->delete(sprintf("railpage:session=%d", $session_id));
            }
    Severity: Minor
    Found in lib/Session.php and 1 other location - About 55 mins to fix
    lib/Session.php on lines 270..273

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

    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

            public function read($session_id) {
                #echo (sprintf("Reading data for session ID railpage:session=%d", $session_id));
                return $this->Memcached->get(sprintf("railpage:session=%d", $session_id));
            }
    Severity: Minor
    Found in lib/Session.php and 1 other location - About 55 mins to fix
    lib/Session.php on lines 294..296

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

    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 8 locations. Consider refactoring.
    Open

                if (!defined("RP_SITE_DOMAIN")) {
                    define("RP_SITE_DOMAIN", "railpage.com.au");
                }
    Severity: Major
    Found in lib/Session.php and 7 other locations - About 50 mins to fix
    lib/Formatting/MultimediaUtility.php on lines 27..29
    lib/Users/User.php on lines 1346..1348
    lib/AppCore.php on lines 38..40
    lib/AppCore.php on lines 42..44
    lib/AppCore.php on lines 46..48
    lib/Module.php on lines 18..20
    lib/Template_Cache_Memcache.php on lines 17..19

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

    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 4 locations. Consider refactoring.
    Open

                if ($html instanceof DialogueModal) {
                    $html = $html->__toString(); 
                }
    Severity: Major
    Found in lib/Session.php and 3 other locations - About 30 mins to fix
    lib/ContentUtility.php on lines 134..136
    lib/ContentUtility.php on lines 138..140
    lib/Debug.php on lines 233..235

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

    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

                        $Memcached->addServer($row['addr'], $row['port']);
    Severity: Minor
    Found in lib/Session.php and 1 other location - About 30 mins to fix
    lib/Images/ImageCache.php on lines 144..144

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

    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

    Avoid using short method names like Session::gc(). The configured minimum method name length is 3.
    Open

            public function gc($maxlifetime) {
                return true;
            }
    Severity: Minor
    Found in lib/Session.php by phpmd

    ShortMethodName

    Since: 0.2

    Detects when very short method names are used.

    Example

    class ShortMethod {
        public function a( $index ) { // Violation
        }
    }

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

    The parameter $save_path is not named in camelCase.
    Open

            public function open($save_path, $name) {
                return true;
            }
    Severity: Minor
    Found in lib/Session.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

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

    Source

    The parameter $session_id is not named in camelCase.
    Open

            public function write($session_id, $session_data) {
                #echo (sprintf("Writing data for session ID railpage:session=%d", $session_id));
    
                return $this->Memcached->put(sprintf("railpage:session=%d", $session_id), $session_data, strtotime("+2 hours"));
            }
    Severity: Minor
    Found in lib/Session.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

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

    Source

    The parameter $session_id is not named in camelCase.
    Open

            public function destroy($session_id) {
                return $this->Memcached->delete(sprintf("railpage:session=%d", $session_id));
            }
    Severity: Minor
    Found in lib/Session.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

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

    Source

    The parameter $session_data is not named in camelCase.
    Open

            public function write($session_id, $session_data) {
                #echo (sprintf("Writing data for session ID railpage:session=%d", $session_id));
    
                return $this->Memcached->put(sprintf("railpage:session=%d", $session_id), $session_data, strtotime("+2 hours"));
            }
    Severity: Minor
    Found in lib/Session.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

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

    Source

    The parameter $session_id is not named in camelCase.
    Open

            public function read($session_id) {
                #echo (sprintf("Reading data for session ID railpage:session=%d", $session_id));
                return $this->Memcached->get(sprintf("railpage:session=%d", $session_id));
            }
    Severity: Minor
    Found in lib/Session.php by phpmd

    CamelCaseParameterName

    Since: 0.2

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

    Example

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

    Source

    Blank line found at start of control structure
    Open

                if (strpos($handlername, "Memcached") !== false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Blank line found at start of control structure
    Open

                if (strpos($handlername, "Redis") !== false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Blank line found at end of control structure
    Open

                    
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    There must be one blank line after the last USE statement; 2 found;
    Open

        use SessionHandlerInterface;
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Blank line found at end of control structure
    Open

                    
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function __construct() {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!isset($_SESSION['message'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if (!in_array($message, $_SESSION['message'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if (!in_array($message, $_SESSION['error'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if (!in_array($message, $_SESSION['infomessage'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!defined("RP_SITE_DOMAIN")) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function message($message = false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function ClearGlobals() {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 0 spaces, found 4
    Open

        class Session implements SessionHandlerInterface {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function modal($html) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function success($message = false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } 
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function gc($maxlifetime) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ($html instanceof DialogueModal) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (strpos($handlername, "Redis") !== false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!empty($message)) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!isset($_SESSION['infomessage'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public $Start;
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!isset($_SESSION['error'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!isset($_SERVER['HTTP_REFERER']) || !strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_ADDR'])) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!empty($message)) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function close() {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function read($session_id) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 0 spaces, found 4
    Open

        }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function getSessionId() {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public $id;
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private $Memcached;
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (!empty($message)) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function open($save_path, $name) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function write($session_id, $session_data) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function destroy($session_id) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (strpos($handlername, "Memcached") !== false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    foreach ($host as $row) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            public function error($message = false) {
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in lib/Session.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status