Commit cbca145e by slavcodev

Add type hinting

parent 35681c61
......@@ -131,17 +131,9 @@ abstract class Validator extends Component
* @param array $params initial values to be applied to the validator properties
* @return Validator the validator
*/
public static function createValidator($type, $object, $attributes, $params = [])
public static function createValidator($type, $object, array $attributes, $params = [])
{
$params['attributes'] = (array) $attributes;
if (isset($params['on'])) {
$params['on'] = (array) $params['on'];
}
if (isset($params['except'])) {
$params['except'] = (array) $params['except'];
}
$params['attributes'] = $attributes;
if (method_exists($object, $type)) {
// method-based validator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment