<commit_before><?php

namespace WebPlatform\AseagleBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;


class StaticController extends Controller
{

    public function welcomeAction()
    {
        //get category
        $cats = $this->getDoctrine()->getRepository('AseagleBundle:Category')->findBy(array('parent_id' => '1'),null,null,null);

        //get 3 lastest product
        $products = $this->getDoctrine()->getRepository('AseagleBundle:Product')->findBy(array(),null,4,null);
        $banner_products_info = array();
        foreach($products as $product)
        {
            $image_helper = $this->get('image_helper');
            $root = "/aseagle/web/files/";
            array_push($banner_products_info, array(
                'id' => $product->getId(),
                'cat_id' => $product->getCategoryId(),
                'n' => $product->getTitle(),<commit_msg>fixed load latest products desc<commit_after><?php

namespace WebPlatform\AseagleBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;


class StaticController extends Controller
{

    public function welcomeAction()
    {
        //get category
        $cats = $this->getDoctrine()->getRepository('AseagleBundle:Category')->findBy(array('parent_id' => '1'),null,null,null);

        //get 3 lastest product
        $products = $this->getDoctrine()->getRepository('AseagleBundle:Product')->findBy(array(),array('id' => 'DESC'),4,null);
        $banner_products_info = array();
        foreach($products as $product)
        {
            $image_helper = $this->get('image_helper');
            $root = "/aseagle/web/files/";
            array_push($banner_products_info, array(
                'id' => $product->getId(),
                'cat_id' => $product->getCategoryId(),
                'n' => $product->getTitle(),
{'fraction_non_alphanumeric': 0.15309973045822103, 'fraction_numerical': 0.003234501347708895, 'mean_word_length': 2.9913978494623654, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '373018', 'n_tokens_mistral': 529, 'n_tokens_neox': 514, 'n_words': 84}