Locker\Repository\Statement\Options::convertToInt PHP Method

convertToInt() protected method

Converts the given value to a Integer if it can be.
protected convertToInt ( mixed $value ) : integer | mixed
$value mixed
return integer | mixed Returns the value unchanged if it can't be converted.
    protected function convertToInt($value)
    {
        $converted_value = (int) $value;
        return $value !== (string) $converted_value ? $value : $converted_value;
    }