original_string: protected function addRequiredForSecretField(ValidatorResolver $resolver, $field, $hidden)
      {
          $resolver->sometimes($field, 'required', function ($input) use ($hidden) {
              return $input->$hidden == 'yes';
          });
      }
code: protected function addRequiredForSecretField(ValidatorResolver $resolver, $field, $hidden)
      {
          $resolver->sometimes($field, 'required', function ($input) use ($hidden) {
              return $input->$hidden == 'yes';
          });
      }
code_tokens: protected function addRequiredForSecretField ( ValidatorResolver $ resolver , $ field , $ hidden ) { $ resolver -> sometimes ( $ field , 'required' , function ( $ input ) use ( $ hidden ) { return $ input -> $ hidden == 'yes' ; } ) ; }
docstring: Add required for secret or password field.
  
  @param  \Illuminate\Contracts\Validation\Validator  $resolver
  @param  string  $field
  @param  string  $hidden
  
  @return void
docstring_tokens: Add required for secret or password field .