<commit_before><?php

namespace SofaChamps\Bundle\BowlPickemBundle\Controller;

use JMS\SecurityExtraBundle\Annotation\Secure;
use JMS\SecurityExtraBundle\Annotation\SecureParam;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use SofaChamps\Bundle\BowlPickemBundle\Entity\Invite;
use SofaChamps\Bundle\BowlPickemBundle\Entity\League;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueFormType;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueCommissionersFormType;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueNoteFormType;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueLockFormType;
use SofaChamps\Bundle\CoreBundle\Entity\User;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

/**
 * @Route("{season}/league")
 */
class LeagueController extends BaseController
{
    /**
     * @Route("/{leagueId}/home", name="league_home")
     * @Secure(roles="ROLE_USER")
     * @ParamConverter("league", class="SofaChampsBowlPickemBundle:League", options={"id" = "leagueId"})
     * @SecureParam(name="league", permissions="VIEW")
     * @Template
     */
    public function homeAction(League $league, $season)
    {
        $user = $this->getUser();
        $pickSet = $league->getPicksetForUser($user);

        if (!$pickSet) {
            $this->addMessage('warning', 'You do not have a pick set for this league');
            return $this->redirect($this->router->generateUrl('league_assoc', array(
                'season' => $season,
                'leagueId' => $league->getId(),
            )));<commit_msg>Fix bad router ref in home action<commit_after><?php

namespace SofaChamps\Bundle\BowlPickemBundle\Controller;

use JMS\SecurityExtraBundle\Annotation\Secure;
use JMS\SecurityExtraBundle\Annotation\SecureParam;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use SofaChamps\Bundle\BowlPickemBundle\Entity\Invite;
use SofaChamps\Bundle\BowlPickemBundle\Entity\League;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueFormType;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueCommissionersFormType;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueNoteFormType;
use SofaChamps\Bundle\BowlPickemBundle\Form\LeagueLockFormType;
use SofaChamps\Bundle\CoreBundle\Entity\User;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

/**
 * @Route("{season}/league")
 */
class LeagueController extends BaseController
{
    /**
     * @Route("/{leagueId}/home", name="league_home")
     * @Secure(roles="ROLE_USER")
     * @ParamConverter("league", class="SofaChampsBowlPickemBundle:League", options={"id" = "leagueId"})
     * @SecureParam(name="league", permissions="VIEW")
     * @Template
     */
    public function homeAction(League $league, $season)
    {
        $user = $this->getUser();
        $pickSet = $league->getPicksetForUser($user);

        if (!$pickSet) {
            $this->addMessage('warning', 'You do not have a pick set for this league');
            return $this->redirect($this->generateUrl('league_assoc', array(
                'season' => $season,
                'leagueId' => $league->getId(),
            )));
{'fraction_non_alphanumeric': 0.12792689891490577, 'fraction_numerical': 0.0, 'mean_word_length': 4.686688311688312, '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': '376652', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1058, 'n_words': 156}