YetiForceCompany/YetiForceCRM

View on GitHub
app/Validator.php

Summary

Maintainability
B
6 hrs
Test Coverage
F
53%

Validator has 36 functions (exceeds 20 allowed). Consider refactoring.
Open

class Validator
{
    /**
     * Function verifies if given value can be recognized as bool.
     *
Severity: Minor
Found in app/Validator.php - About 4 hrs to fix

    Consider simplifying this complex logical expression.
    Open

            if (($arrInput = \explode(' ', $input)) && 2 === \count($arrInput)) {
                [$dateInput, $timeInput] = $arrInput;
                [$y, $m, $d] = Fields\Date::explode($dateInput);
                $result = checkdate($m, $d, $y) && is_numeric($y) && is_numeric($m) && is_numeric($d)
                    && preg_match('/(2[0-3]|[0][0-9]|1[0-9]):([0-5][0-9]):([0-5][0-9])/', $timeInput);
    Severity: Major
    Found in app/Validator.php - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

              if (($arrInput = \explode(' ', $input, 2)) && 2 === \count($arrInput)) {
                  $userModel = User::getUserModel($userId ?? User::getCurrentUserId());
                  [$dateInput, $timeInput] = $arrInput;
                  [$y, $m, $d] = Fields\Date::explode($dateInput, $userModel->getDetail('date_format'));
                  if ('12' === $userModel->getDetail('hour_format')) {
      Severity: Major
      Found in app/Validator.php - About 40 mins to fix

        syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')'
        Open

                    $url = preg_replace_callback('/:\/\/([^\/]+)/', fn ($matches) => '://' . idn_to_ascii($matches[1], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46), $url);
        Severity: Critical
        Found in app/Validator.php by phan

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function bool($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dateInUserFormat(string $input, ?int $userId = null): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (null === $userId) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    [$dateInput, $timeInput] = $arrInput;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return $result;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $result = false;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param bool|int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function standard(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function alnum($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is compatible with default time format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $pattern = '/^([0][0-9]|1[0-2]):([0-5][0-9])([ ]PM|[ ]AM|PM|AM)$/';
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is compatible with user’s date format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 170 characters
        Open

                return preg_match('/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if ('12' === User::getUserModel($userId)->getDetail('hour_format')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dateTime(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return null !== filter_var($input, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|null $userId
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dateTimeInIsoFormat(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                        $pattern = '/^(2[0-3]|[0][0-9]|1[0-9]):([0-5][0-9])(:([0-5][0-9]))?([ ]PM|[ ]AM|PM|AM)?$/';
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return $result;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string   $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $result = checkdate($m, $d, $y) && is_numeric($y) && is_numeric($m) && is_numeric($d)
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dateTimeInUserFormat(string $input, ?int $userId = null): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    [$y, $m, $d] = Fields\Date::explode($dateInput, $userModel->getDetail('date_format'));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is compatible with default data format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function date(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (($arrInput = \explode(' ', $input)) && 2 === \count($arrInput)) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string   $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    } else {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                        $pattern = '/^(2[0-3]|[0][0-9]|1[0-9]):([0-5][0-9])(:([0-5][0-9]))?$/';
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *  Function verifies if given value is compatible with user’s time format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string   $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is integer type.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value contains only words or digits.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return Fields\Date::isValid($input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $pattern = '/^(2[0-3]|[0][0-9]|1[0-9]):([0-5][0-9])$/';
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is compatible with default date and time format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is compatible with user’s  date and time format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[[:alnum:]_ ]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return Fields\Date::isValid($input, User::getUserModel($userId)->getDetail('date_format'));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function time(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $value2 = round($value2, $precision);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 132 characters
        Open

                return static::floatIsEqual($value1, $value2, (int) \App\User::getCurrentUserModel()->getDetail('no_of_currency_decimals'));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if its mysql type.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return false !== filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE) && $email === filter_var($email, FILTER_SANITIZE_EMAIL);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 122 characters
        Open

                if (mb_strlen($url) != \strlen($url) && \function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (mb_strlen($input) != \strlen($input) && \function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is standard text.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[\-_a-zA-Z]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[[:alnum:]_]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function timeInUserFormat(string $input, ?int $userId = null): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $result = false;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                        && preg_match('/(2[0-3]|[0][0-9]|1[0-9]):([0-5][0-9]):([0-5][0-9])/', $timeInput);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    if ('12' === $userModel->getDetail('hour_format')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $value1 = round($value1, $precision);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param float $value1
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return static::floatIsEqual($value1, $value2, (int) \App\User::getCurrentUserModel()->getDetail('no_of_currency_decimals'));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $url
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function url(string $url): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value can be recognized as bool.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string   $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $userId = User::getCurrentUserId();
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $userId = User::getCurrentUserId();
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function integer($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return false !== filter_var($input, FILTER_VALIDATE_INT);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is float type.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function float($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $url = preg_replace_callback('/:\/\/([^\/]+)/', fn ($matches) => '://' . idn_to_ascii($matches[1], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46), $url);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is compatible with date time in ISO format.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|null $userId
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if ($rounding) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is a correct language tag.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *  Function checks if given value is email.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (($arrInput = \explode(' ', $input, 2)) && 2 === \count($arrInput)) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 134 characters
        Open

                    $result = checkdate($m, $d, $y) && is_numeric($y) && is_numeric($m) && is_numeric($d) && preg_match($pattern, $timeInput);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $dbType
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is url.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value contains only words, digits  or space.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function alnumSpace($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^(2[0-3]|[0][0-9]|1[0-9]):([0-5][0-9]):([0-5][0-9])$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|null $userId
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match($pattern, $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    [$y, $m, $d] = Fields\Date::explode($dateInput);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check if floating point numbers are equal. Get the precision of the number from the user's settings.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function floatIsEqualUserCurrencyDecimals(float $value1, float $value2): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *  Function checks if given value is email.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (null === $userId) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|null $userId
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    [$dateInput, $timeInput] = $arrInput;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $result = checkdate($m, $d, $y) && is_numeric($y) && is_numeric($m) && is_numeric($d) && preg_match($pattern, $timeInput);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param float $value1
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param float $value2
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $email
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (false === strpos($url, '://')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return false !== filter_var($input, FILTER_VALIDATE_FLOAT);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param mixed $rounding
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is a natural number.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[0-9]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function email(string $email): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    if ($email && !self::email($email)) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                        return false;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is url or domain.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 174 characters
        Open

                    $url = preg_replace_callback('/:\/\/([^\/]+)/', fn ($matches) => '://' . idn_to_ascii($matches[1], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46), $url);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $input = idn_to_ascii($input, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                foreach ($input as $ipAddress) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $userModel = User::getUserModel($userId ?? User::getCurrentUserId());
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param float $value2
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function languageTag(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function isMySQL(string $dbType): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function domain(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param float|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function floatIsEqual(float $value1, float $value2, int $precision = 2, $rounding = true): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return 0 === stripos($dbType, 'mysql');
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string|array $emails
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 126 characters
        Open

                if (mb_strlen($input) != \strlen($input) && \function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                        $result = false;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                        break;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return !preg_match('/[\\/:\*\?"<>|]/', $input) && false === strpos($input, '.', -1);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check path.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check if floating point numbers are equal.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                foreach ($emails as $email) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    return static::domain($url);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return static::url($url);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (mb_strlen($url) != \strlen($url) && \function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return false !== filter_var($url, FILTER_VALIDATE_URL);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function sql($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string|string[] $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function ipOrDomain($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return self::ip($input) || self::domain($input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return Purifier::decodeHtml(Purifier::purify($input)) === $input;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function path(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (empty($input)) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return 2 === \count($explode) && 1 === preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $explode[1]);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is database type.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return $input && explode('-', $input) === explode('_', \Locale::acceptFromHttp($input));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function emails($emails): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return true;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int|string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function ip($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check base64.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    $url = 'http://' . $url;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 123 characters
        Open

                return preg_match('/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    if (false === filter_var($ipAddress, FILTER_VALIDATE_IP)) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function text(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check font icon name.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return isset((new Db())->schemaMap[$input]);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is correct database name (mysql).
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Line exceeds 120 characters; contains 150 characters
        Open

                return false !== filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE) && $email === filter_var($email, FILTER_SANITIZE_EMAIL);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $emails = \is_string($emails) ? explode(',', $emails) : $emails;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $url
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                if (!parse_url($url, PHP_URL_SCHEME)) {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is domain.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[_a-zA-Z0-9.,:-]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $result = true;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return $result;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function base64(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $explode = explode(',', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dbUserName($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function port($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check if input is an ip or domain value.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function verifies if given value is text.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return !array_filter($parts, fn ($dir) => !self::dirName($dir));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[^\\/?%*:|\\\"<>.\s]{1,64}$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check directory name.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @see https://www.php.net/manual/en/language.types.float.php
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int   $precision
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return 0 === bccomp($value1, $value2, $precision);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function naturalNumber($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @return bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function urlDomain(string $url): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return false !== filter_var($input, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dbType(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dbName(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function dirName(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function fontIcon(string $input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is valid db user name.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is port number.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[_a-zA-Z0-9.,:]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            public static function timePeriod($input): bool
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^[0-9]{1,18}\:(d|H|i){1}$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param string $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $parts = explode('/', trim(str_replace(\DIRECTORY_SEPARATOR, '/', $input), '/'));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                    return false;
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * @param int $input
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check if input is an time period value.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Check if input is an ip value.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                $input = \is_array($input) ? $input : [$input];
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return !empty($input) && preg_match('/^[[:alnum:]_\- ]+$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

                return preg_match('/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/', $input);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             * Function checks if given value is valid SQl input.
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Space before opening parenthesis of function call prohibited
        Open

                    $url = preg_replace_callback('/:\/\/([^\/]+)/', fn ($matches) => '://' . idn_to_ascii($matches[1], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46), $url);
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        Space before opening parenthesis of function call prohibited
        Open

                return !array_filter($parts, fn ($dir) => !self::dirName($dir));
        Severity: Minor
        Found in app/Validator.php by phpcodesniffer

        There are no issues that match your filters.

        Category
        Status