public static function truthy($check, array $truthyValues = [])
    {
        if (!$truthyValues) {
            $truthyValues = [true, 1, '1'];
        }

        return in_array($check, $truthyValues, true);
    }
public static function truthy($check, array $truthyValues = [])
    {
        if (!$truthyValues) {
            $truthyValues = [true, 1, '1'];
        }

        return in_array($check, $truthyValues, true);
    }
public static function truthy ( $ check , array $ truthyValues = [ ] ) { if ( ! $ truthyValues ) { $ truthyValues = [ true , 1 , '1' ] ; } return in_array ( $ check , $ truthyValues , true ) ; }
Validates if given value is truthy.

The list of what is considered to be truthy values, may be set via $truthyValues.

@param bool|int|string $check Value to check.
@param array $truthyValues List of valid truthy values, defaults to `[true, 1, '1']`.
@return bool Success.
Validates if given value is truthy .