attogram/attogram

View on GitHub

Showing 51 of 308 total issues

Avoid too many return statements within this method.
Open

                return;
Severity: Major
Found in public/index.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return;
    Severity: Major
    Found in public/index.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return;
      Severity: Major
      Found in public/index.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return;
        Severity: Major
        Found in public/index.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return;
          Severity: Major
          Found in public/index.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return $content;
            Severity: Major
            Found in Attogram/Attogram.php - About 30 mins to fix

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

                  public function isAdmin()
                  {
                      if (isset($this->isAdmin) && is_bool($this->isAdmin)) {
                          return $this->isAdmin;
                      }
              Severity: Minor
              Found in Attogram/Attogram.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

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

                  public function checkApache()
                  {
                      isset($_SERVER['SERVER_SOFTWARE'])
                          ? $serverSoftware = $_SERVER['SERVER_SOFTWARE'] : $serverSoftware = '';
                      $serverSoftwareArray = explode(' ', $serverSoftware);
              Severity: Minor
              Found in public/check.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

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

                  public function awaken()
                  {
                      // The Site Administrator IP addresses
                      $this->remember(
                          'admins',
              Severity: Minor
              Found in Attogram/Attogram.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

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

                  public function meditate()
                  {
                      // Set default configuration
                      $this->config = array();
                      $this->config['attogramDirectory']  = '..'.DIRECTORY_SEPARATOR;
              Severity: Minor
              Found in public/index.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

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

                  public function exceptionFiles()
                  {
                      switch ($this->request->getPathInfo()) {
                          case '/robots.txt':
                              header('Content-Type: text/plain; charset=utf-8');
              Severity: Minor
              Found in Attogram/Attogram.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

              Severity
              Category
              Status
              Source
              Language