rtckit/php-sip

View on GitHub
src/URI.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Method parse has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    public static function parse(string $text): URI
    {
        $pos = strpos($text, ':');

        if ($pos === false) {
Severity: Major
Found in src/URI.php - About 4 hrs to fix

    Method render has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

        public function render(): string
        {
            if (!isset($this->scheme)) {
                throw new InvalidURIException('Cannot render URI without scheme', Response::INTERNAL_SERVER_ERROR);
            }
    Severity: Major
    Found in src/URI.php - About 2 hrs to fix

      File URI.php has 252 lines of code (exceeds 250 allowed). Consider refactoring.
      Wontfix

      <?php
      /**
       * RTCKit\SIP\URI Class
       */
      declare(strict_types = 1);
      Severity: Minor
      Found in src/URI.php - About 2 hrs to fix

        Method isEquivalent has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Wontfix

            public function isEquivalent(URI $uri): bool
            {
                if (!isset($this->scheme, $this->host, $uri->scheme, $uri->host)) {
                    throw new InvalidURIException('Cannot compare invalid URIs', Response::INTERNAL_SERVER_ERROR);
                }
        Severity: Minor
        Found in src/URI.php - About 1 hr to fix

          Avoid too many return statements within this method.
          Wontfix

                      return false;
          Severity: Major
          Found in src/URI.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Wontfix

                        return false;
            Severity: Major
            Found in src/URI.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Wontfix

                          return false;
              Severity: Major
              Found in src/URI.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Wontfix

                            return false;
                Severity: Major
                Found in src/URI.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Wontfix

                              return false;
                  Severity: Major
                  Found in src/URI.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Wontfix

                                return false;
                    Severity: Major
                    Found in src/URI.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Wontfix

                                      return false;
                      Severity: Major
                      Found in src/URI.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Wontfix

                                return true;
                        Severity: Major
                        Found in src/URI.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Wontfix

                                      return false;
                          Severity: Major
                          Found in src/URI.php - About 30 mins to fix

                            There are no issues that match your filters.

                            Category
                            Status