original_string: public function flag($reason = null)
      {
          $this->props['isValid'] = false;
          $this->classAdd($this->props['attribsContainer'], 'has-error');
          if ($this->attribs['type'] == 'file' && isset($this->form->currentValues[ $this->attribs['name'] ])) {
              $fileInfo = $this->form->currentValues[ $this->attribs['name'] ];
              \unlink($fileInfo['tmp_name']);
              unset($this->form->currentValues[ $this->attribs['name'] ]);
          }
          if (!\is_null($reason)) {
              $this->props['invalidReason'] = $reason;
          }
          return;
      }
code: public function flag($reason = null)
      {
          $this->props['isValid'] = false;
          $this->classAdd($this->props['attribsContainer'], 'has-error');
          if ($this->attribs['type'] == 'file' && isset($this->form->currentValues[ $this->attribs['name'] ])) {
              $fileInfo = $this->form->currentValues[ $this->attribs['name'] ];
              \unlink($fileInfo['tmp_name']);
              unset($this->form->currentValues[ $this->attribs['name'] ]);
          }
          if (!\is_null($reason)) {
              $this->props['invalidReason'] = $reason;
          }
          return;
      }
code_tokens: public function flag ( $ reason = null ) { $ this -> props [ 'isValid' ] = false ; $ this -> classAdd ( $ this -> props [ 'attribsContainer' ] , 'has-error' ) ; if ( $ this -> attribs [ 'type' ] == 'file' && isset ( $ this -> form -> currentValues [ $ this -> attribs [ 'name' ] ] ) ) { $ fileInfo = $ this -> form -> currentValues [ $ this -> attribs [ 'name' ] ] ; \ unlink ( $ fileInfo [ 'tmp_name' ] ) ; unset ( $ this -> form -> currentValues [ $ this -> attribs [ 'name' ] ] ) ; } if ( ! \ is_null ( $ reason ) ) { $ this -> props [ 'invalidReason' ] = $ reason ; } return ; }
docstring: Flag a field as invalid
  
  @param string $reason The reason that will be given to the user
  
  @return void
docstring_tokens: Flag a field as invalid