original_string: protected function makeForm($resource, $class, $model)
      {
          $form = $this->container->make($class);
  
          if (!$this->formRules($form) && $rules = $this->rules($resource)) {
              $form->getValidator()->setRules($rules);
          }
  
          if ($model) {
              $form->setModel($model);
          }
  
          $this->publish($resource, 'form.created', [$form]);
  
          return $form;
      }
code: protected function makeForm($resource, $class, $model)
      {
          $form = $this->container->make($class);
  
          if (!$this->formRules($form) && $rules = $this->rules($resource)) {
              $form->getValidator()->setRules($rules);
          }
  
          if ($model) {
              $form->setModel($model);
          }
  
          $this->publish($resource, 'form.created', [$form]);
  
          return $form;
      }
code_tokens: protected function makeForm ( $ resource , $ class , $ model ) { $ form = $ this -> container -> make ( $ class ) ; if ( ! $ this -> formRules ( $ form ) && $ rules = $ this -> rules ( $ resource ) ) { $ form -> getValidator ( ) -> setRules ( $ rules ) ; } if ( $ model ) { $ form -> setModel ( $ model ) ; } $ this -> publish ( $ resource , 'form.created' , [ $ form ] ) ; return $ form ; }
docstring: Creates the form and fires an event
  
  @param string $resource
  @param string $class
  @param mixed $model
  @return \FormObject\Form
docstring_tokens: Creates the form and fires an event