rtckit/php-sip

View on GitHub
src/Message.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Method parse has 224 lines of code (exceeds 25 allowed). Consider refactoring.
Invalid

    public static function parse(string $text, bool $ignoreBody = false): Message
    {
        $text = ltrim($text, "\r\n");
        $lines = explode("\r\n", $text);

Severity: Major
Found in src/Message.php - About 1 day to fix

    File Message.php has 475 lines of code (exceeds 250 allowed). Consider refactoring.
    Invalid

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

      Method renderHeaders has 149 lines of code (exceeds 25 allowed). Consider refactoring.
      Invalid

          public function renderHeaders(bool $compact): string
          {
              $ret = '';
      
              if (isset($this->via)) {
      Severity: Major
      Found in src/Message.php - About 5 hrs to fix

        There are no issues that match your filters.

        Category
        Status