<commit_before><?php

namespace VC\BaseBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use VC\BaseBundle\Entity\Aerolinea;
use VC\BaseBundle\Form\AerolineaType;

/**
 * Aerolinea controller.
 *
 * @Route("/aerolinea")
 */
class AerolineaController extends Controller
{

    /**
     * @Route("/ajaxAerolineas",name="aerolineas_ajax", defaults={"_format"="json"})
     */
    public function ajaxAerolineasAction(Request $request)
    {
        $em = $this->getDoctrine()->getEntityManager();
        $query = $em->createQuery("SELECT 'aerolinea' as tipo,a.id, a.nombre FROM VCBaseBundle:Aerolinea a");
       //$query->setParameter('tiposervicio',"asesoria");
        $query->where('a.status is NULL');
       $entities = $query->getResult();

       $response = new Response();
	   $r=array();
	   foreach($entities as $row){
		   $r[]=array(
            "id"=>$row['id'],
		   	'text' => $row['nombre']

		   );
	   }
	   $response->setContent(json_encode($r));
	   return $response;
    }
	
	/**
	 * Lists all agencia entities JSON format
	 * @Route("/JSONList",name="aerolinea_list")
	 * @Method("GET")
	 * 
	 */
<commit_msg>where<commit_after><?php

namespace VC\BaseBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use VC\BaseBundle\Entity\Aerolinea;
use VC\BaseBundle\Form\AerolineaType;

/**
 * Aerolinea controller.
 *
 * @Route("/aerolinea")
 */
class AerolineaController extends Controller
{

    /**
     * @Route("/ajaxAerolineas",name="aerolineas_ajax", defaults={"_format"="json"})
     */
    public function ajaxAerolineasAction(Request $request)
    {
        $em = $this->getDoctrine()->getEntityManager();
        $query = $em->createQuery("SELECT 'aerolinea' as tipo,a.id, a.nombre FROM VCBaseBundle:Aerolinea a WHERE a.status is NULL");
       //$query->setParameter('tiposervicio',"asesoria");
       $entities = $query->getResult();

       $response = new Response();
	   $r=array();
	   foreach($entities as $row){
		   $r[]=array(
            "id"=>$row['id'],
		   	'text' => $row['nombre']

		   );
	   }
	   $response->setContent(json_encode($r));
	   return $response;
    }
	
	/**
	 * Lists all agencia entities JSON format
	 * @Route("/JSONList",name="aerolinea_list")
	 * @Method("GET")
	 * 
	 */

{'fraction_non_alphanumeric': 0.15611814345991562, 'fraction_numerical': 0.0, 'mean_word_length': 3.9650959860383943, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '6340724', 'n_tokens_mistral': 950, 'n_tokens_neox': 895, 'n_words': 143}