<commit_before><?php

namespace EspaceMembers\MainBundle\Controller;

use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Model\UserInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\JsonResponse;
use EspaceMembers\MainBundle\Entity\Teaching;

class BookmarkController extends Controller
{
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();
        \Kint::dump($em->getRepository('EspaceMembersMainBundle:Chronology')
                ->findUserBookmark($this->getUser()->getId()));die;
        return $this->render('EspaceMembersMainBundle:Bookmark:index.html.twig', array(
            'chronologies' => $em->getRepository('EspaceMembersMainBundle:Chronology')
                ->findUserBookmark($this->getUser()->getId()),
        ));
    }

    /**
     * @ParamConverter(name="teaching")
     */
    public function addAction(Request $request, Teaching $teaching)
    {
        $em = $this->getDoctrine()->getManager();
        $user = $this->getUser();<commit_msg>Update BookmarkController.php<commit_after><?php

namespace EspaceMembers\MainBundle\Controller;

use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Model\UserInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\JsonResponse;
use EspaceMembers\MainBundle\Entity\Teaching;

class BookmarkController extends Controller
{
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();
        return $this->render('EspaceMembersMainBundle:Bookmark:index.html.twig', array(
            'chronologies' => $em->getRepository('EspaceMembersMainBundle:Chronology')
                ->findUserBookmark($this->getUser()->getId()),
        ));
    }

    /**
     * @ParamConverter(name="teaching")
     */
    public function addAction(Request $request, Teaching $teaching)
    {
        $em = $this->getDoctrine()->getManager();
        $user = $this->getUser();
{'fraction_non_alphanumeric': 0.12686266612968183, 'fraction_numerical': 0.0, 'mean_word_length': 4.47136563876652, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '6613501', 'n_tokens_mistral': 681, 'n_tokens_neox': 676, 'n_words': 96}