<commit_before><?php

namespace AppBundle\Controller\Odr;

use AppBundle\Form as FormDir;
use AppBundle\Service\OdrStatusService;
use AppBundle\Service\SectionValidator\Odr\ActionsValidator;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Controller\AbstractController;

class ActionController extends AbstractController
{
    private static $jmsGroups = [
        'client-cot',
        //TODO merge groups in the API into "odr-action"
        'odr-action-give-gifts',
        'odr-action-property',
        'odr-action-more-info',
    ];


    /**
     * @Route("/odr/{odrId}/actions", name="odr_actions")
     * @Template()
     */
    public function startAction(Request $request, $odrId)
    {
        $odr = $this->getOdr($odrId, self::$jmsGroups);
        if (!$odr->hasAtLeastOneAction()) {
            return $this->redirectToRoute('odr_actions_summary', ['odrId' => $odrId]);
        }

        return [
            'odr' => $odr,<commit_msg>DDPB-499 fix wrong redirect on start page<commit_after><?php

namespace AppBundle\Controller\Odr;

use AppBundle\Form as FormDir;
use AppBundle\Service\OdrStatusService;
use AppBundle\Service\SectionValidator\Odr\ActionsValidator;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Controller\AbstractController;

class ActionController extends AbstractController
{
    private static $jmsGroups = [
        'client-cot',
        //TODO merge groups in the API into "odr-action"
        'odr-action-give-gifts',
        'odr-action-property',
        'odr-action-more-info',
    ];


    /**
     * @Route("/odr/{odrId}/actions", name="odr_actions")
     * @Template()
     */
    public function startAction(Request $request, $odrId)
    {
        $odr = $this->getOdr($odrId, self::$jmsGroups);
        if ($odr->hasAtLeastOneAction()) {
            return $this->redirectToRoute('odr_actions_summary', ['odrId' => $odrId]);
        }

        return [
            'odr' => $odr,
{'fraction_non_alphanumeric': 0.12980132450331125, 'fraction_numerical': 0.0013245033112582781, 'mean_word_length': 3.3576923076923078, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '365245', 'n_tokens_mistral': 708, 'n_tokens_neox': 701, 'n_words': 125}