<commit_before><?php
namespace AppBundle\Action\Schedule2016;

trait ScheduleControllerTrait
{
    protected function filterGames($games,$filter)
    {
        $filters = explode(',',$filter);
        $filtersTrimmed = [];
        foreach($filters as $filter) {
            $filter = trim($filter);
            if ($filter) {
                $filtersTrimmed[] = $filter;
            }
        }
        if (count($filtersTrimmed) < 1) {
            return $games;
        }
        dump($filtersTrimmed);
        $filteredGames = [];
        foreach($games as $game) {
            foreach($filtersTrimmed as $filter) {
                $filteredGame = $this->filterGame($game,$filter);
                if ($filteredGame) {
                    $filteredGames[] = $filteredGame;
                }
            }
        }
        return $filteredGames;

    }
    private function filterGame(ScheduleGame $game, $filter)
    {
        $homeTeam = $game->homeTeam;
        $awayTeam = $game->awayTeam;

        if (strpos($homeTeam->regTeamName,$filter) !== false) return $game;
        if (strpos($awayTeam->regTeamName,$filter) !== false) return $game;

        if (strpos($homeTeam->poolTeamView,$filter) !== false) return $game;
        if (strpos($awayTeam->poolTeamView,$filter) !== false) return $game;

        if (strpos($game->dow,      $filter) !== false) return $game;
        if (strpos($game->time,     $filter) !== false) return $game;
        if (strpos($game->fieldName,$filter) !== false) return $game;

        $officials = $game->getOfficials();<commit_msg>Removed dump() statement.<commit_after><?php
namespace AppBundle\Action\Schedule2016;

trait ScheduleControllerTrait
{
    protected function filterGames($games,$filter)
    {
        $filters = explode(',',$filter);
        $filtersTrimmed = [];
        foreach($filters as $filter) {
            $filter = trim($filter);
            if ($filter) {
                $filtersTrimmed[] = $filter;
            }
        }
        if (count($filtersTrimmed) < 1) {
            return $games;
        }
        $filteredGames = [];
        foreach($games as $game) {
            foreach($filtersTrimmed as $filter) {
                $filteredGame = $this->filterGame($game,$filter);
                if ($filteredGame) {
                    $filteredGames[] = $filteredGame;
                }
            }
        }
        return $filteredGames;

    }
    private function filterGame(ScheduleGame $game, $filter)
    {
        $homeTeam = $game->homeTeam;
        $awayTeam = $game->awayTeam;

        if (strpos($homeTeam->regTeamName,$filter) !== false) return $game;
        if (strpos($awayTeam->regTeamName,$filter) !== false) return $game;

        if (strpos($homeTeam->poolTeamView,$filter) !== false) return $game;
        if (strpos($awayTeam->poolTeamView,$filter) !== false) return $game;

        if (strpos($game->dow,      $filter) !== false) return $game;
        if (strpos($game->time,     $filter) !== false) return $game;
        if (strpos($game->fieldName,$filter) !== false) return $game;

        $officials = $game->getOfficials();
{'fraction_non_alphanumeric': 0.1488, 'fraction_numerical': 0.0032, 'mean_word_length': 2.1671732522796354, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6646008', 'n_tokens_mistral': 928, 'n_tokens_neox': 872, 'n_words': 178}