<commit_before><?php

namespace AppBundle\Controller;

use AppBundle\Form\Type\testresultType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class TestresultsController extends Controller
{
    public function showAction($testresultId)
    {
        $user = $this
            ->get('demo_aware_user_service')
            ->getUser($request, $this->getUser());

        if (empty($user)) {
            $this->addFlash('error', 'Access denied.');
            return $this->redirect($this->get('router')->generate('homepage'));
        }

        $em = $this->getDoctrine()->getManager();
        $testresultRepo = $em->getRepository('AppBundle\Entity\testresult');
        $testresult = $testresultRepo->find($testresultId);<commit_msg>fixed testresults controller request passing<commit_after><?php

namespace AppBundle\Controller;

use AppBundle\Form\Type\testresultType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class TestresultsController extends Controller
{
    public function showAction(Request $request, $testresultId)
    {
        $user = $this
            ->get('demo_aware_user_service')
            ->getUser($request, $this->getUser());

        if (empty($user)) {
            $this->addFlash('error', 'Access denied.');
            return $this->redirect($this->get('router')->generate('homepage'));
        }

        $em = $this->getDoctrine()->getManager();
        $testresultRepo = $em->getRepository('AppBundle\Entity\testresult');
        $testresult = $testresultRepo->find($testresultId);
{'fraction_non_alphanumeric': 0.14776409591704473, 'fraction_numerical': 0.0, 'mean_word_length': 3.4495677233429394, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '3220503', 'n_tokens_mistral': 419, 'n_tokens_neox': 420, 'n_words': 69}