mambax7/xnewsletter

View on GitHub
include/phpmailer/class.pop3.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method connect has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function connect($host, $port = false, $tval = 30)
    {
        //  Are we already connected?
        if ($this->connected) {
            return true;
Severity: Minor
Found in include/phpmailer/class.pop3.php - About 1 hr to fix

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

            $host,
            $port = false,
            $timeout = false,
            $username = '',
            $password = '',
    Severity: Minor
    Found in include/phpmailer/class.pop3.php - About 45 mins to fix

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

          public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
      Severity: Minor
      Found in include/phpmailer/class.pop3.php - About 45 mins to fix

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

            public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
            {
                $this->host = $host;
                // If no port value provided, use default
                if (false === $port) {
        Severity: Minor
        Found in include/phpmailer/class.pop3.php - About 35 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function login has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public function login($username = '', $password = '')
            {
                if (!$this->connected) {
                    $this->setError('Not connected to POP3 server');
                }
        Severity: Minor
        Found in include/phpmailer/class.pop3.php - About 25 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

        There are no issues that match your filters.

        Category
        Status