original_string: protected function _findExistingTranslations($ruleSet)
      {
          $association = $this->_table->getAssociation($this->_translationTable->getAlias());
  
          $query = $association->find()
              ->select(['id', 'num' => 0])
              ->where(current($ruleSet))
              ->disableHydration()
              ->disableBufferedResults();
  
          unset($ruleSet[0]);
          foreach ($ruleSet as $i => $conditions) {
              $q = $association->find()
                  ->select(['id', 'num' => $i])
                  ->where($conditions);
              $query->unionAll($q);
          }
  
          return $query->all()->combine('num', 'id')->toArray();
      }
code: protected function _findExistingTranslations($ruleSet)
      {
          $association = $this->_table->getAssociation($this->_translationTable->getAlias());
  
          $query = $association->find()
              ->select(['id', 'num' => 0])
              ->where(current($ruleSet))
              ->disableHydration()
              ->disableBufferedResults();
  
          unset($ruleSet[0]);
          foreach ($ruleSet as $i => $conditions) {
              $q = $association->find()
                  ->select(['id', 'num' => $i])
                  ->where($conditions);
              $query->unionAll($q);
          }
  
          return $query->all()->combine('num', 'id')->toArray();
      }
code_tokens: protected function _findExistingTranslations ( $ ruleSet ) { $ association = $ this -> _table -> getAssociation ( $ this -> _translationTable -> getAlias ( ) ) ; $ query = $ association -> find ( ) -> select ( [ 'id' , 'num' => 0 ] ) -> where ( current ( $ ruleSet ) ) -> disableHydration ( ) -> disableBufferedResults ( ) ; unset ( $ ruleSet [ 0 ] ) ; foreach ( $ ruleSet as $ i => $ conditions ) { $ q = $ association -> find ( ) -> select ( [ 'id' , 'num' => $ i ] ) -> where ( $ conditions ) ; $ query -> unionAll ( $ q ) ; } return $ query -> all ( ) -> combine ( 'num' , 'id' ) -> toArray ( ) ; }
docstring: Returns the ids found for each of the condition arrays passed for the translations
  table. Each records is indexed by the corresponding position to the conditions array
  
  @param array $ruleSet an array of arary of conditions to be used for finding each
  @return array
docstring_tokens: Returns the ids found for each of the condition arrays passed for the translations table . Each records is indexed by the corresponding position to the conditions array