for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Arcanedev\Gravatar\Helpers;
/**
* Class NumberChecker
*
* @author ARCANEDEV <[email protected]>
*/
class NumberChecker
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Check if an integer is between two values.
* @param int $value
* @param int $min
* @param int $max
* @return bool
public static function isIntBetween(int $value, int $min, int $max): bool
return $value >= $min && $value <= $max;
}
* Check if value is integer.
* @param mixed $value
public static function isIntValue($value): bool
return is_int($value) || ctype_digit($value);