protected function rules(User $user, Model $model = null)
    {
        $rules = [];

        foreach ($this->getRules() as $rule) {
            $rules[] = new $rule($user, $model);
        }

        return $rules;
    }
protected function rules(User $user, Model $model = null)
    {
        $rules = [];

        foreach ($this->getRules() as $rule) {
            $rules[] = new $rule($user, $model);
        }

        return $rules;
    }
protected function rules ( User $ user , Model $ model = null ) { $ rules = [ ] ; foreach ( $ this -> getRules ( ) as $ rule ) { $ rules [ ] = new $ rule ( $ user , $ model ) ; } return $ rules ; }
Returns an array of constructed rules.

@param User       $user
@param Model|null $model

@return array
Returns an array of constructed rules .