hooman-mirghasemi/Laravel-iran-sms

View on GitHub

Showing 4 of 6 total issues

Method getErrors has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getErrors(): array
    {
        $errors = [];
        $errors[1]['title'] = 'INVALID_RECIPIENT_NUMBER';
        $errors[1]['desc'] = 'the string you presented as recipient numbers are not valid phone numbers, please check them again';
Severity: Major
Found in src/Drivers/Magfa.php - About 2 hrs to fix

    Method send has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function send(): bool
        {
            try {
                if ($this->message->usesTemplate()) {
                    $template = $this->message->getTemplate();
    Severity: Minor
    Found in src/Drivers/Kavenegar.php - About 1 hr to fix

      Method register has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function register(): void
          {
              $this->mergeConfigFiles();
      
              $this->app->register(RouteServiceProvider::class);
      Severity: Minor
      Found in src/Providers/SmsProvider.php - About 1 hr to fix

        Avoid too many return statements within this method.
        Open

                    return new Avanak($config);
        Severity: Major
        Found in src/Providers/SmsProvider.php - About 30 mins to fix
          Severity
          Category
          Status
          Source
          Language