e107inc/e107

View on GitHub
e107_handlers/iphandler_class.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
24%

Avoid too many return statements within this method.
Open

            return 'ip';
Severity: Major
Found in e107_handlers/iphandler_class.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            if (strpos($ip, 'fc00:') === 0) return FALSE;                            // local addresses
    Severity: Major
    Found in e107_handlers/iphandler_class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return 'unknown';
      Severity: Major
      Found in e107_handlers/iphandler_class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return TRUE;
        Severity: Major
        Found in e107_handlers/iphandler_class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  if ($ip == '0000:0000:0000:0000:0000:0000:0000:0001') return FALSE;
          Severity: Major
          Found in e107_handlers/iphandler_class.php - About 30 mins to fix

            Argument #2 of this call to \strpos is typically a literal or constant but isn't, but argument #1 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
            Open

                    if (strpos(':', $ip) === FALSE) return TRUE;
            Severity: Minor
            Found in e107_handlers/iphandler_class.php by phan

            Saw possibly unextractable annotation for a fragment of comment '* @param string(?) $perms - required permissions as standard *nix 3-digit string': after string, did not see an element name (will guess based on comment order)
            Open

                 *    @param string(?) $perms - required permissions as standard *nix 3-digit string
            Severity: Info
            Found in e107_handlers/iphandler_class.php by phan

            Argument 1 (string) is false but \strlen() takes string
            Open

                    while (($togo = (39 - strlen($address))) > 0)
            Severity: Minor
            Found in e107_handlers/iphandler_class.php by phan

            Saw a token Phan may have failed to parse after '* @return string. '0' if date is zero, else formatted in consistent way.': after string, saw '.'
            Open

                 *    @return string. '0' if date is zero, else formatted in consistent way.
            Severity: Info
            Found in e107_handlers/iphandler_class.php by phan

            Variable $ret was undeclared, but array fields are being added to it.
            Open

                    $ret['banDate'] = $temp[0];
            Severity: Info
            Found in e107_handlers/iphandler_class.php by phan

            Variable $pref was undeclared, but array fields are being added to it.
            Open

                    $pref['ban_durations'] = e107::getPref('ban_durations');
            Severity: Info
            Found in e107_handlers/iphandler_class.php by phan

            Returning type false but ipDecode() is declared to return string
            Open

                    if (strpos($ip, ':') === false) return FALSE;            // Return on problem - no ':'!
            Severity: Minor
            Found in e107_handlers/iphandler_class.php by phan

            Variable $pref was undeclared, but array fields are being added to it.
            Open

                    $pref['ban_messages'] = e107::getPref('ban_messages');
            Severity: Info
            Found in e107_handlers/iphandler_class.php by phan

            Argument #2 of this call to \strrpos is typically a literal or constant but isn't, but argument #1 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
            Open

                    if (($tv = strrpos('@', $email)) !== FALSE)
            Severity: Minor
            Found in e107_handlers/iphandler_class.php by phan

            Saw a token Phan may have failed to parse after '* @param string(?) $perms - required permissions as standard *nix 3-digit string': after string, saw '('
            Open

                 *    @param string(?) $perms - required permissions as standard *nix 3-digit string
            Severity: Info
            Found in e107_handlers/iphandler_class.php by phan

            There are no issues that match your filters.

            Category
            Status