@param mixed $value

@return int
553251
private function validatePageLimit($value): int
    {
        $ruleIndexes    = $this->serializerClass::readPageLimitRuleIndexes($this->getSerializedRuleSet());
        $validatedValue = $this->validatePaginationValue($value, $ruleIndexes);

        return $validatedValue;
    }
998895
public static function toMilliseconds($value = null)
    {
        if (! $value) {
            return null;
        }

        if (! $value instanceof Carbon) {
            $value = Carbon::parse($value); // attempt to parse it
        }

        return (int) $value->timestamp * 1000;
    }
1244164
protected static function normalizeValue($value)
    {
        if (is_bool($value)) {
            $value = (bool)$value;
            return $value;
        } elseif (is_numeric($value)) {
            return (int)$value;
        }
        return $value;
    }
390573
private function calc_size( $value ) {

		$type = gettype( $value );

		switch ( $type ) {
			case 'string' :
				return function_exists( 'mb_strlen' ) ? mb_strlen( $value ) : strlen( $value );
			case 'integer' :
			case 'double' :
			case 'boolean' :
				return (int) $value;
			case 'array' :
			case 'object' :
				return count( $value );
		}

		return - 1;

	}
1135346
public static function isInteger($value)
    {
        if (is_int($value)) {
            return true;
        } elseif (!is_string($value)) {
            return false;
        }

        return preg_match('/^\d+$/', $value) > 0;
    }
267191
private function getValueType($value)
    {
        if (is_string($value))
            return 'string';
        if (is_bool($value))
            return 'bool';
        if (is_float($value))
            return 'float';
        if (is_numeric($value))
            return 'int';
        if (is_array($value))
            return 'array';
        return 'mixed';
    }
133365
public function protectedTrim($value)
    {
        for ($i = count($value) - 1; $i >= 0; -- $i) {
            if ($value[$i]) {
                break;
            }
            unset($value[$i]);
        }
        return $value;
    }
590812
public static function int(&$value, $options = ['max'=>null, 'min'=>null, 'default'=>null])
    {
        $value = (int)$value;
        self::processNum($value, $options);
        return $value;
    }
514663
public function setValue($value)
	{
		$value = (int) $value;
		$value = parent::setValue($value);
		return $value;
	}
179906
public static function IsInteger( $value ) : bool
   {

      return \is_int( $value ) || (bool) \preg_match( static::$rxInt32, (string) $value );

   }
447814
public function indexOfValue($value)
    {
        $name = $this->getNameByValue($value);
        if(!is_null($name))
        {
            return $this->indexOfKey($name);
        }
        return -1;
    }
92288
protected function parseParameterType($value): int
    {

        if ($value === null) {
            return PDO::PARAM_NULL;
        }

        if (\is_int($value) === true || \is_bool($value) === true) {
            return PDO::PARAM_INT;
        }

        return PDO::PARAM_STR;
    }
628508
public static function arrayToInt($value=[])
    {
        if(!is_array($value) || count($value) == 0){
            return 0;
        }
        $nReturn = 0;
        foreach ($value as $item){
            if(($nReturn & $item) <= 0){
                $nReturn += $item;
            }
        }
        return $nReturn;
    }
871794
private function getIndividualValue($value)
    {
        if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
            return $value;
        }

        return $this->em->getUnitOfWork()->getSingleIdentifierValue($value);
    }
1205066
public function find($value): ?int
    {
        $founded = $this->items->find($value);

        if (false === $founded) {
            return null;
        }

        return (int) $founded;
    }
1099469
public static function convertToBytes(string $value): int
    {
        $units = "BKMGT";
        $unit = preg_replace("/[^$units]/i", "", $value);
        $value = floatval($value);
        if ($unit) {
            $value *= pow(1024, stripos($units, $unit[0]));
        }

        return (int) $value;
    }
503306
public function sanitize($value)
    {
        $value = (int) filter_var($value, FILTER_SANITIZE_NUMBER_INT);

        if(isset($this->max) && $value > (int) $this->max) {
            $value = (int) $this->max;
        }

        if(isset($this->min) && $value < (int) $this->min) {
            $value = (int) $this->min;
        }

        return $value;
    }