<commit_before><?php

namespace KevinVR\FootbelAPIBundle\Controller;

use FOS\RestBundle\Controller\FOSRestController;

use FOS\RestBundle\Controller\Annotations as Rest;
use KevinVR\FootbelBackendBundle\Entity\Level;
use KevinVR\FootbelBackendBundle\Entity\Province;
use KevinVR\FootbelBackendBundle\Entity\Season;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;

/**
 * Class RankingController
 * @package KevinVR\FootbelAPIBundle\Controller
 */
class RankingAPIController extends FOSRestController
{
    /**
     * Retrieve national rankings with optional period.
     *
     * @param \KevinVR\FootbelBackendBundle\Entity\Season $season
     * @param string $division
     * @param int $period
     *
     * @return \Symfony\Component\HttpFoundation\Response
     *
     * @Rest\Get("/ranking/national/{shorthand_season}/{division}/{period}", defaults={"period" = 0})
     * @ParamConverter("season", options={"mapping": {"shorthand_season": "shorthand"}})
     * @Rest\View
     */
    public function getRankingNationalAction(Season $season, $division, $period, Request $request)<commit_msg>Add Request parameter to all routes<commit_after><?php

namespace KevinVR\FootbelAPIBundle\Controller;

use FOS\RestBundle\Controller\FOSRestController;

use FOS\RestBundle\Controller\Annotations as Rest;
use KevinVR\FootbelBackendBundle\Entity\Level;
use KevinVR\FootbelBackendBundle\Entity\Province;
use KevinVR\FootbelBackendBundle\Entity\Season;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;

/**
 * Class RankingController
 * @package KevinVR\FootbelAPIBundle\Controller
 */
class RankingAPIController extends FOSRestController
{
    /**
     * Retrieve national rankings with optional period.
     *
     * @param \KevinVR\FootbelBackendBundle\Entity\Season $season
     * @param string $division
     * @param int $period
     *
     * @return \Symfony\Component\HttpFoundation\Response
     *
     * @Rest\Get("/ranking/national/{shorthand_season}/{division}/{period}", defaults={"period" = 0})
     * @ParamConverter("season", options={"mapping": {"shorthand_season": "shorthand"}})
     * @Rest\View
     */
    public function getRankingNationalAction(Season $season, $division, $period, Request $request)
{'fraction_non_alphanumeric': 0.11163522012578617, 'fraction_numerical': 0.0007861635220125787, 'mean_word_length': 5.016548463356974, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, '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': '3402198', 'n_tokens_mistral': 742, 'n_tokens_neox': 732, 'n_words': 130}