Laragear/WebAuthn

View on GitHub
src/CborDecoder.php

Summary

Maintainability
B
4 hrs
Test Coverage

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

    protected static function parseFloatSimple(int $val, ByteBuffer $buf, int &$offset): bool|float|null
    {
        switch ($val) {
            case 24:
                $val = $buf->getByteVal($offset);
Severity: Minor
Found in src/CborDecoder.php - About 1 hr to fix

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

        protected static function parseExtraLength(int $val, ByteBuffer $buf, int &$offset): int
        {
            switch ($val) {
                case 24:
                    $val = $buf->getByteVal($offset);
    Severity: Minor
    Found in src/CborDecoder.php - About 1 hr to fix

      Avoid too many return statements within this method.
      Open

                      return $val;
      Severity: Major
      Found in src/CborDecoder.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return static::parseMap($buf, $offset, $val);
        Severity: Major
        Found in src/CborDecoder.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return static::parseItem($buf, $offset); // 1 embedded data item
          Severity: Major
          Found in src/CborDecoder.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return static::parseSimpleValue($val);
            Severity: Major
            Found in src/CborDecoder.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return static::parseArray($buf, $offset, $val);
              Severity: Major
              Found in src/CborDecoder.php - About 30 mins to fix

                There are no issues that match your filters.

                Category
                Status