src/Bridge/Doctrine/Common/Filter/RangeFilterTrait.php
private function normalizeBetweenValues(array $values): ?array
    {
        if (2 !== \count($values)) {
            $this->getLogger()->notice('Invalid filter ignored', [
                'exception' => new InvalidArgumentException(sprintf('Invalid format for "[%s]", expected "<min>..<max>"', self::PARAMETER_BETWEEN)),
            ]);

            return null;
        }

        if (!is_numeric($values[0]) || !is_numeric($values[1])) {
            $this->getLogger()->notice('Invalid filter ignored', [
                'exception' => new InvalidArgumentException(sprintf('Invalid values for "[%s]" range, expected numbers', self::PARAMETER_BETWEEN)),
            ]);

            return null;
        }

        return [$values[0] + 0, $values[1] + 0]; // coerce to the right types.
    }
private function normalizeBetweenValues(array $values): ?array
    {
        if (2 !== \count($values)) {
            $this->getLogger()->notice('Invalid filter ignored', [
                'exception' => new InvalidArgumentException(sprintf('Invalid format for "[%s]", expected "<min>..<max>"', self::PARAMETER_BETWEEN)),
            ]);

            return null;
        }

        if (!is_numeric($values[0]) || !is_numeric($values[1])) {
            $this->getLogger()->notice('Invalid filter ignored', [
                'exception' => new InvalidArgumentException(sprintf('Invalid values for "[%s]" range, expected numbers', self::PARAMETER_BETWEEN)),
            ]);

            return null;
        }

        return [$values[0] + 0, $values[1] + 0]; // coerce to the right types.
    }
private function normalizeBetweenValues ( array $ values ) : ? array { if ( 2 !== \ count ( $ values ) ) { $ this -> getLogger ( ) -> notice ( 'Invalid filter ignored' , [ 'exception' => new InvalidArgumentException ( sprintf ( 'Invalid format for "[%s]", expected "<min>..<max>"' , self :: PARAMETER_BETWEEN ) ) , ] ) ; return null ; } if ( ! is_numeric ( $ values [ 0 ] ) || ! is_numeric ( $ values [ 1 ] ) ) { $ this -> getLogger ( ) -> notice ( 'Invalid filter ignored' , [ 'exception' => new InvalidArgumentException ( sprintf ( 'Invalid values for "[%s]" range, expected numbers' , self :: PARAMETER_BETWEEN ) ) , ] ) ; return null ; } return [ $ values [ 0 ] + 0 , $ values [ 1 ] + 0 ] ; // coerce to the right types. }
Normalize the values array for between operator.
Normalize the values array for between operator .