<?php

namespace AppBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * TraitFormatRepository
 *
 * This class was generated by the PhpStorm "Php Annotations" Plugin. Add your own custom
 * repository methods below.
 */
class TraitFormatRepository extends EntityRepository
{
    public function getFormat($traitFormatId){
        $qb = $this->getEntityManager()->createQueryBuilder();
        $qb->select('t.format')
            ->from('AppBundle\Entity\TraitFormat', 't')
            ->where('t.id = :trait_format_id')
            ->setParameter('trait_format_id', $traitFormatId);
    }
}

<?php

namespace AppBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * TraitFormatRepository
 *
 * This class was generated by the PhpStorm "Php Annotations" Plugin. Add your own custom
 * repository methods below.
 */
class TraitFormatRepository extends EntityRepository
{
    public function getFormat($traitFormatId){
        $qb = $this->getEntityManager()->createQueryBuilder();
        $qb->select('t.format')
            ->from('AppBundle\Entity\TraitFormat', 't')
            ->where('t.id = :trait_format_id')
            ->setParameter('trait_format_id', $traitFormatId);
        $query = $qb->getQuery();
        return $query->getSingleResult();
    }
}

Add missing execution of query
Add missing execution of query
