original_string: public function setAttribute(string $key, string $value)
      {
          if ($this->valid($key, $value)) {
              $value = encrypt($value);
          }
  
          return parent::setAttribute($key, $value);
      }
code: public function setAttribute(string $key, string $value)
      {
          if ($this->valid($key, $value)) {
              $value = encrypt($value);
          }
  
          return parent::setAttribute($key, $value);
      }
code_tokens: public function setAttribute ( string $ key , string $ value ) { if ( $ this -> valid ( $ key , $ value ) ) { $ value = encrypt ( $ value ) ; } return parent :: setAttribute ( $ key , $ value ) ; }
docstring: Encrypt field value before inserting into database
  
  @param string $key
  @param string $value
  @return mixed
docstring_tokens: Encrypt field value before inserting into database