original_string: public function createAction()
      {
          if ($this->request->isPost()) {
  
              $profile = new Profiles([
                  'name' => $this->request->getPost('name', 'striptags'),
                  'active' => $this->request->getPost('active')
              ]);
  
              if (!$profile->save()) {
                  $this->flash->error($profile->getMessages());
              } else {
                  $this->flash->success("Profile was created successfully");
              }
  
              Tag::resetInput();
          }
  
          $this->view->form = new ProfilesForm(null);
      }
code: public function createAction()
      {
          if ($this->request->isPost()) {
  
              $profile = new Profiles([
                  'name' => $this->request->getPost('name', 'striptags'),
                  'active' => $this->request->getPost('active')
              ]);
  
              if (!$profile->save()) {
                  $this->flash->error($profile->getMessages());
              } else {
                  $this->flash->success("Profile was created successfully");
              }
  
              Tag::resetInput();
          }
  
          $this->view->form = new ProfilesForm(null);
      }
code_tokens: public function createAction ( ) { if ( $ this -> request -> isPost ( ) ) { $ profile = new Profiles ( [ 'name' => $ this -> request -> getPost ( 'name' , 'striptags' ) , 'active' => $ this -> request -> getPost ( 'active' ) ] ) ; if ( ! $ profile -> save ( ) ) { $ this -> flash -> error ( $ profile -> getMessages ( ) ) ; } else { $ this -> flash -> success ( "Profile was created successfully" ) ; } Tag :: resetInput ( ) ; } $ this -> view -> form = new ProfilesForm ( null ) ; }
docstring: Creates a new Profile
docstring_tokens: Creates a new Profile