efipay/sdk-php-apis-efi

View on GitHub

Showing 9 of 9 total issues

File Pix.php has 273 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
 
return [
"URL" => [
"production" => "https://pix.api.efipay.com.br",
Severity: Minor
Found in src/Efi/Endpoints/Pix.php - About 2 hrs to fix

    File Charges.php has 253 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
     
    return [
    "URL" => [
    "production" => "https://cobrancas.api.efipay.com.br",
    Severity: Minor
    Found in src/Efi/Endpoints/Charges.php - About 2 hrs to fix

      Method options has 37 lines of code (exceeds 30 allowed). Consider refactoring.
      Open

      public static function options(array $options): array
      {
      $getBoolean = function ($key, $default = false) use ($options) {
      return isset($options[$key]) ? filter_var($options[$key], FILTER_VALIDATE_BOOLEAN) : $default;
      };
      Severity: Minor
      Found in src/Efi/Config.php - About 1 hr to fix

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

        public function __get($property)
        {
        if (property_exists($this, $property)) {
        return $this->$property;
        }
        Severity: Minor
        Found in src/Efi/Response.php and 1 other location - About 55 mins to fix
        src/Efi/Exception/EfiException.php on lines 112..119

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

        public function __get($property)
        {
        if (property_exists($this, $property)) {
        return $this->$property;
        }
        Severity: Minor
        Found in src/Efi/Exception/EfiException.php and 1 other location - About 55 mins to fix
        src/Efi/Response.php on lines 30..37

        Identical blocks of code found in 3 locations. Consider refactoring.
        Open

        if ($data === null || ($data['expires'] && $data['expires'] < time())) {
        $this->delete($key);
        return [];
        }
        Severity: Major
        Found in src/Efi/FileCacheRetriever.php and 2 other locations - About 45 mins to fix
        src/Efi/FileCacheRetriever.php on lines 98..100
        src/Efi/FileCacheRetriever.php on lines 138..140

        Identical blocks of code found in 3 locations. Consider refactoring.
        Open

        if ($data === null || ($data['expires'] && $data['expires'] < time())) {
        return false;
        }
        Severity: Major
        Found in src/Efi/FileCacheRetriever.php and 2 other locations - About 45 mins to fix
        src/Efi/FileCacheRetriever.php on lines 54..57
        src/Efi/FileCacheRetriever.php on lines 138..140

        Identical blocks of code found in 3 locations. Consider refactoring.
        Open

        if ($data === null || ($data['expires'] && $data['expires'] < time())) {
        unlink($file);
        }
        Severity: Major
        Found in src/Efi/FileCacheRetriever.php and 2 other locations - About 45 mins to fix
        src/Efi/FileCacheRetriever.php on lines 54..57
        src/Efi/FileCacheRetriever.php on lines 98..100

        Avoid too many return statements within this method.
        Open

        return $conf;
        Severity: Major
        Found in src/Efi/Config.php - About 30 mins to fix
          Severity
          Category
          Status
          Source
          Language