<commit_before><?php

namespace Lorry\Presenter\Addon;

use Lorry\Presenter;
use Lorry\ModelFactory;
use Lorry\Exception\FileNotFoundException;

class Presentation extends Presenter {

	public function get($gamename, $addonname, $release = 'latest') {
		$game = ModelFactory::build('Game')->byShort($gamename);
		if(!$game) {
			throw new FileNotFoundException('game '.$game);
		}

		$addon = ModelFactory::build('Addon')->byShort($addonname, $game->getId());
		if(!$addon) {
			throw new FileNotFoundException('game '.$game);
		}

		$this->context['title'] = $addon->getTitle();

		$this->display('addon/release.twig');
	}

}<commit_msg>fixed incorrect error message on 404<commit_after><?php

namespace Lorry\Presenter\Addon;

use Lorry\Presenter;
use Lorry\ModelFactory;
use Lorry\Exception\FileNotFoundException;

class Presentation extends Presenter {

	public function get($gamename, $addonname, $release = 'latest') {
		$game = ModelFactory::build('Game')->byShort($gamename);
		if(!$game) {
			throw new FileNotFoundException('game '.$gamename);
		}

		$addon = ModelFactory::build('Addon')->byShort($addonname, $game->getId());
		if(!$addon) {
			throw new FileNotFoundException('addon '.$addonname);
		}

		$this->context['title'] = $addon->getTitle();

		$this->display('addon/release.twig');
	}

}
{'fraction_non_alphanumeric': 0.17265087853323147, 'fraction_numerical': 0.002291825821237586, 'mean_word_length': 5.616161616161616, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '6190774', 'n_tokens_mistral': 470, 'n_tokens_neox': 437, 'n_words': 79}