original_string: public function setInvalid(array $fields, $overwrite = false)
      {
          foreach ($fields as $field => $value) {
              if ($overwrite === true) {
                  $this->_invalid[$field] = $value;
                  continue;
              }
              $this->_invalid += [$field => $value];
          }
  
          return $this;
      }
code: public function setInvalid(array $fields, $overwrite = false)
      {
          foreach ($fields as $field => $value) {
              if ($overwrite === true) {
                  $this->_invalid[$field] = $value;
                  continue;
              }
              $this->_invalid += [$field => $value];
          }
  
          return $this;
      }
code_tokens: public function setInvalid ( array $ fields , $ overwrite = false ) { foreach ( $ fields as $ field => $ value ) { if ( $ overwrite === true ) { $ this -> _invalid [ $ field ] = $ value ; continue ; } $ this -> _invalid += [ $ field => $ value ] ; } return $ this ; }
docstring: Set fields as invalid and not patchable into the entity.
  
  This is useful for batch operations when one needs to get the original value for an error message after patching.
  This value could not be patched into the entity and is simply copied into the _invalid property for debugging purposes
  or to be able to log it away.
  
  @param array $fields The values to set.
  @param bool $overwrite Whether or not to overwrite pre-existing values for $field.
  @return $this
docstring_tokens: Set fields as invalid and not patchable into the entity .