t1gor/Robots.txt-Parser-Class

View on GitHub
source/Parser/HostName.php

Summary

Maintainability
A
0 mins
Test Coverage

Opening brace of a class must be on the line after the definition
Open

class HostName {
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $isIpAddress = false !== $filtered && static::isIpAddress($filtered);
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return false !== $filtered && !$isIpAddress;
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function isValid(string $hostName): bool {
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $hostName === filter_var($hostName, FILTER_VALIDATE_IP);
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $filtered    = filter_var($hostName, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME);
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function isIpAddress(string $hostName): bool {
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Opening brace should be on a new line
Open

    public static function isIpAddress(string $hostName): bool {
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

Opening brace should be on a new line
Open

    public static function isValid(string $hostName): bool {
Severity: Minor
Found in source/Parser/HostName.php by phpcodesniffer

There are no issues that match your filters.

Category
Status