<commit_before><?php

namespace monad\admin;

class Media_Controller extends Controller
{
    protected function get(array $args)
    {
        extract($args);
        if (!($media = Media_Finder::instance()->find($id))) {
            throw new HTTP404_Exception();
        }
        $args['mimetype'] = $media['mimetype'];
        if (isset($type)) {
            switch ($type) {
                case 'png': $args['mimetype'] = 'image/png'; break;
                case 'jpg':
                case 'jpeg':
                    $args['mimetype'] = 'image/jpeg';
                    break;
            }
        }
        $this->template = false;
        $helper = new Media_Helper;
        return $this->view('misc/media', compact('media', 'helper') + $args);
    }
}
<commit_msg>modernize<commit_after><?php

namespace monad\admin;

class Media_Controller extends Controller
{
    protected function get(array $args)
    {
        extract($args);
        if (!($media = Media_Finder::instance()->find($id))) {
            throw new HTTP404_Exception;
        }
        $args['mimetype'] = $media['mimetype'];
        if (isset($type)) {
            switch ($type) {
                case 'png': $args['mimetype'] = 'image/png'; break;
                case 'jpg':
                case 'jpeg':
                    $args['mimetype'] = 'image/jpeg';
                    break;
            }
        }
        $this->template = false;
        $helper = new Media_Helper;
        return $this->view('misc/media', compact('media', 'helper') + $args);
    }
}

{'fraction_non_alphanumeric': 0.15483870967741936, 'fraction_numerical': 0.003870967741935484, 'mean_word_length': 1.7647058823529411, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5664062', 'n_tokens_mistral': 453, 'n_tokens_neox': 435, 'n_words': 92}