for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaravelPropertyBag\Settings\Rules;
class Rules
{
/**
* Return true if value is alpha characters.
*
* @param mixed $value
* @return bool
*/
public static function ruleAlpha($value)
return ctype_alpha($value);
}
* Return true for everything.
public static function ruleAny()
return true;
public static function ruleAlphanum($value)
return ctype_alnum($value);
public static function ruleBool($value)
return is_bool($value);
* Return true if value is integer.
public static function ruleInt($value)
return is_int($value);
* Return true if value is numeric.
public static function ruleNum($value)
return is_numeric($value);
* @param int $low
* @param int $high
public static function ruleRange($value, $low, $high)
return ($low <= $value) && ($value <= $high);
* Return true if value is a string.
public static function ruleString($value)
return is_string($value);