original_string: public function foreignKey($key = null)
      {
          deprecationWarning(
              get_called_class() . '::foreignKey() is deprecated. ' .
              'Use setForeignKey()/getForeignKey() instead.'
          );
          if ($key !== null) {
              $this->setForeignKey($key);
          }
  
          return $this->getForeignKey();
      }
code: public function foreignKey($key = null)
      {
          deprecationWarning(
              get_called_class() . '::foreignKey() is deprecated. ' .
              'Use setForeignKey()/getForeignKey() instead.'
          );
          if ($key !== null) {
              $this->setForeignKey($key);
          }
  
          return $this->getForeignKey();
      }
code_tokens: public function foreignKey ( $ key = null ) { deprecationWarning ( get_called_class ( ) . '::foreignKey() is deprecated. ' . 'Use setForeignKey()/getForeignKey() instead.' ) ; if ( $ key !== null ) { $ this -> setForeignKey ( $ key ) ; } return $ this -> getForeignKey ( ) ; }
docstring: Sets the name of the field representing the foreign key to the target table.
  If no parameters are passed the current field is returned
  
  @deprecated 3.4.0 Use setForeignKey()/getForeignKey() instead.
  @param string|null $key the key to be used to link both tables together
  @return string|array
docstring_tokens: Sets the name of the field representing the foreign key to the target table . If no parameters are passed the current field is returned