/** * f\fill_validating_normalizing_or_throw($coll, $paramRules) * * Combines filling, validating and normalization, throwing if validation fails. */ function fill_validating_normalizing_or_throw($coll, $paramRules) { f\validate_coll_or_throw($coll, $paramRules); $filled = f\fill($coll, $paramRules); return f\normalize_coll($filled, $paramRules); }
/** * f\fill_validating_or_throw($coll, $paramRules) * * Combines filling and validation, throwing if validation fails. */ function fill_validating_or_throw($coll, $paramRules) { f\validate_coll_or_throw($coll, $paramRules); return f\fill($coll, $paramRules); }
/** * @expectedException \InvalidArgumentException */ public function testItThrowsAnExceptionIfARuleIsNotAnInstanceOfParamRule() { $coll = array(); $rules = array('a' => 'is_int'); f\fill($coll, $rules); }