original_string: public function find($type = null, array $options = [])
      {
          $type = $type ?: $this->getFinder();
          list($type, $opts) = $this->_extractFinder($type);
          $query = $this->getTarget()
              ->find($type, $options + $opts)
              ->where($this->targetConditions())
              ->addDefaultTypes($this->getTarget());
  
          if (!$this->junctionConditions()) {
              return $query;
          }
  
          $belongsTo = $this->junction()->getAssociation($this->getTarget()->getAlias());
          $conditions = $belongsTo->_joinCondition([
              'foreignKey' => $this->getTargetForeignKey()
          ]);
          $conditions += $this->junctionConditions();
  
          return $this->_appendJunctionJoin($query, $conditions);
      }
code: public function find($type = null, array $options = [])
      {
          $type = $type ?: $this->getFinder();
          list($type, $opts) = $this->_extractFinder($type);
          $query = $this->getTarget()
              ->find($type, $options + $opts)
              ->where($this->targetConditions())
              ->addDefaultTypes($this->getTarget());
  
          if (!$this->junctionConditions()) {
              return $query;
          }
  
          $belongsTo = $this->junction()->getAssociation($this->getTarget()->getAlias());
          $conditions = $belongsTo->_joinCondition([
              'foreignKey' => $this->getTargetForeignKey()
          ]);
          $conditions += $this->junctionConditions();
  
          return $this->_appendJunctionJoin($query, $conditions);
      }
code_tokens: public function find ( $ type = null , array $ options = [ ] ) { $ type = $ type ? : $ this -> getFinder ( ) ; list ( $ type , $ opts ) = $ this -> _extractFinder ( $ type ) ; $ query = $ this -> getTarget ( ) -> find ( $ type , $ options + $ opts ) -> where ( $ this -> targetConditions ( ) ) -> addDefaultTypes ( $ this -> getTarget ( ) ) ; if ( ! $ this -> junctionConditions ( ) ) { return $ query ; } $ belongsTo = $ this -> junction ( ) -> getAssociation ( $ this -> getTarget ( ) -> getAlias ( ) ) ; $ conditions = $ belongsTo -> _joinCondition ( [ 'foreignKey' => $ this -> getTargetForeignKey ( ) ] ) ; $ conditions += $ this -> junctionConditions ( ) ; return $ this -> _appendJunctionJoin ( $ query , $ conditions ) ; }
docstring: Proxies the finding operation to the target table's find method
  and modifies the query accordingly based of this association
  configuration.
  
  If your association includes conditions, the junction table will be
  included in the query's contained associations.
  
  @param string|array|null $type the type of query to perform, if an array is passed,
  it will be interpreted as the `$options` parameter
  @param array $options The options to for the find
  @see \Cake\ORM\Table::find()
  @return \Cake\ORM\Query
docstring_tokens: Proxies the finding operation to the target table s find method and modifies the query accordingly based of this association configuration .