<commit_before><?php

namespace AppBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * TaxonomyNodeRepository
 *
 * This class was generated by the PhpStorm "Php Annotations" Plugin. Add your own custom
 * repository methods below.
 */
class TaxonomyNodeRepository extends EntityRepository
{
    public function getDatabases($fennec_id){
        $qb = $this->getEntityManager()->createQueryBuilder();
        $qb->select('t.taxonomyNodeId', 'db.name')
            ->from('AppBundle\Entity\TaxonomyNode', 't')
            ->innerJoin('AppBundle\Entity\Db','db','WITH', 't.db = db.dbId')
            ->where('t.fennec = :fennec_id')
            ->setParameter('fennec_id', $fennec_id);
        $query = $qb->getQuery();
        $result = $query->getArrayResult();

//        $result = array();
//        while($row = $stm_get_taxonomy_databases->fetch(PDO::FETCH_ASSOC)){
//            $result[$row['name']] = $row['taxonomy_node_id'];
//        }
//        return $result;
    }

    public function getLineage(){

    }
}<commit_msg>Add for loop in order to get correct structure of data<commit_after><?php

namespace AppBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * TaxonomyNodeRepository
 *
 * This class was generated by the PhpStorm "Php Annotations" Plugin. Add your own custom
 * repository methods below.
 */
class TaxonomyNodeRepository extends EntityRepository
{
    public function getDatabases($fennec_id){
        $qb = $this->getEntityManager()->createQueryBuilder();
        $qb->select('t.taxonomyNodeId', 'db.name')
            ->from('AppBundle\Entity\TaxonomyNode', 't')
            ->innerJoin('AppBundle\Entity\Db','db','WITH', 't.db = db.dbId')
            ->where('t.fennec = :fennec_id')
            ->setParameter('fennec_id', $fennec_id);
        $query = $qb->getQuery();
        $data = $query->getArrayResult();

        $result = array();
        for($i=0;$i<sizeof($data);$i++){
            $result[$data[$i]['name']] = $data[$i]['taxonomyNodeId'];
        }
        return $result;
    }

    public function getLineage(){

    }
}
{'fraction_non_alphanumeric': 0.16028708133971292, 'fraction_numerical': 0.0004784688995215311, 'mean_word_length': 2.9904580152671754, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5825756', 'n_tokens_mistral': 656, 'n_tokens_neox': 648, 'n_words': 125}