eveseat/eseye

View on GitHub

Showing 12 of 57 total issues

Method new_login has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function new_login()
{

    $action = $_SERVER['PHP_SELF'] . '?action=submitsecrets';
    $callback = get_sso_callback_url();
Severity: Major
Found in bin/index.php - About 5 hrs to fix

    Eseye has 26 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Eseye
    {
    
        /**
         * The Eseye Version.
    Severity: Minor
    Found in src/Eseye.php - About 3 hrs to fix

      File index.php has 276 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /*
       * This file is part of SeAT
       *
      Severity: Minor
      Found in bin/index.php - About 2 hrs to fix

        Function invoke has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

            public function invoke(string $method, string $uri, array $uri_data = []): EsiResponse
            {
        
                // Check the Access Requirement
                if (! $this->getAccessChecker()->can(
        Severity: Minor
        Found in src/Eseye.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

        Method httpRequest has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function httpRequest(
                string $method, string $uri, array $headers = [], array $body = []): EsiResponse
            {
        
                // Include some basic headers to those already passed in. Everything
        Severity: Minor
        Found in src/Fetchers/GuzzleFetcher.php - About 1 hr to fix

          Method refreshToken has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function refreshToken()
              {
          
                  // Make the post request for a new access_token
                  try {
          Severity: Minor
          Found in src/Fetchers/GuzzleFetcher.php - About 1 hr to fix

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

                public function invoke(string $method, string $uri, array $uri_data = []): EsiResponse
                {
            
                    // Check the Access Requirement
                    if (! $this->getAccessChecker()->can(
            Severity: Minor
            Found in src/Eseye.php - About 1 hr to fix

              Function mapDataToUri has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function mapDataToUri(string $uri, array $data): string
                  {
              
                      // Extract fields in curly braces. If there are fields,
                      // replace the data with those in the URI
              Severity: Minor
              Found in src/Eseye.php - About 45 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 __construct has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function __construct($instance = null)
                  {
              
                      if ($instance != null)
                          $this->memcached = $instance;
              Severity: Minor
              Found in src/Cache/MemcachedCache.php - About 45 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 checkCacheDirectory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function checkCacheDirectory()
                  {
              
                      // Ensure the cache path exists
                      if (! is_dir($this->cache_path) &&
              Severity: Minor
              Found in src/Cache/FileCache.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function __construct(
                      string $data, array $headers, string $expires, int $response_code)
                  {
              
                      // set the raw data to the raw property
              Severity: Minor
              Found in src/Containers/EsiResponse.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function __construct(array $data = null)
                  {
              
                      if (! is_null($data)) {
              
              
              Severity: Minor
              Found in src/Traits/ConstructsContainers.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