original_string: protected function _appendJunctionJoin($query, $conditions)
      {
          $name = $this->_junctionAssociationName();
          /** @var array $joins */
          $joins = $query->clause('join');
          $matching = [
              $name => [
                  'table' => $this->junction()->getTable(),
                  'conditions' => $conditions,
                  'type' => QueryInterface::JOIN_TYPE_INNER
              ]
          ];
  
          $assoc = $this->getTarget()->getAssociation($name);
          $query
              ->addDefaultTypes($assoc->getTarget())
              ->join($matching + $joins, [], true);
  
          return $query;
      }
code: protected function _appendJunctionJoin($query, $conditions)
      {
          $name = $this->_junctionAssociationName();
          /** @var array $joins */
          $joins = $query->clause('join');
          $matching = [
              $name => [
                  'table' => $this->junction()->getTable(),
                  'conditions' => $conditions,
                  'type' => QueryInterface::JOIN_TYPE_INNER
              ]
          ];
  
          $assoc = $this->getTarget()->getAssociation($name);
          $query
              ->addDefaultTypes($assoc->getTarget())
              ->join($matching + $joins, [], true);
  
          return $query;
      }
code_tokens: protected function _appendJunctionJoin ( $ query , $ conditions ) { $ name = $ this -> _junctionAssociationName ( ) ; /** @var array $joins */ $ joins = $ query -> clause ( 'join' ) ; $ matching = [ $ name => [ 'table' => $ this -> junction ( ) -> getTable ( ) , 'conditions' => $ conditions , 'type' => QueryInterface :: JOIN_TYPE_INNER ] ] ; $ assoc = $ this -> getTarget ( ) -> getAssociation ( $ name ) ; $ query -> addDefaultTypes ( $ assoc -> getTarget ( ) ) -> join ( $ matching + $ joins , [ ] , true ) ; return $ query ; }
docstring: Append a join to the junction table.
  
  @param \Cake\ORM\Query $query The query to append.
  @param string|array $conditions The query conditions to use.
  @return \Cake\ORM\Query The modified query.
docstring_tokens: Append a join to the junction table .