original_string: public function hasOne($associated, array $options = [])
      {
          $options += ['sourceTable' => $this];
  
          /** @var \Cake\ORM\Association\HasOne $association */
          $association = $this->_associations->load(HasOne::class, $associated, $options);
  
          return $association;
      }
code: public function hasOne($associated, array $options = [])
      {
          $options += ['sourceTable' => $this];
  
          /** @var \Cake\ORM\Association\HasOne $association */
          $association = $this->_associations->load(HasOne::class, $associated, $options);
  
          return $association;
      }
code_tokens: public function hasOne ( $ associated , array $ options = [ ] ) { $ options += [ 'sourceTable' => $ this ] ; /** @var \Cake\ORM\Association\HasOne $association */ $ association = $ this -> _associations -> load ( HasOne :: class , $ associated , $ options ) ; return $ association ; }
docstring: Creates a new HasOne association between this table and a target
  table. A "has one" association is a 1-1 relationship.
  
  Target table can be inferred by its name, which is provided in the
  first argument, or you can either pass the class name to be instantiated or
  an instance of it directly.
  
  The options array accept the following keys:
  
  - className: The class name of the target table object
  - targetTable: An instance of a table object to be used as the target table
  - foreignKey: The name of the field to use as foreign key, if false none
  will be used
  - dependent: Set to true if you want CakePHP to cascade deletes to the
  associated table when an entity is removed on this table. The delete operation
  on the associated table will not cascade further. To get recursive cascades enable
  `cascadeCallbacks` as well. Set to false if you don't want CakePHP to remove
  associated data, or when you are using database constraints.
  - cascadeCallbacks: Set to true if you want CakePHP to fire callbacks on
  cascaded deletes. If false the ORM will use deleteAll() to remove data.
  When true records will be loaded and then deleted.
  - conditions: array with a list of conditions to filter the join with
  - joinType: The type of join to be used (e.g. LEFT)
  - strategy: The loading strategy to use. 'join' and 'select' are supported.
  - finder: The finder method to use when loading records from this association.
  Defaults to 'all'. When the strategy is 'join', only the fields, containments,
  and where conditions will be used from the finder.
  
  This method will return the association object that was built.
  
  @param string $associated the alias for the target table. This is used to
  uniquely identify the association
  @param array $options list of options to configure the association definition
  @return \Cake\ORM\Association\HasOne
docstring_tokens: Creates a new HasOne association between this table and a target table . A has one association is a 1 - 1 relationship .