<commit_before><?php

class Materials extends Module {

    function viewsList() {
        $return = [
            'inherit' => 'Как у родителя',
            'default' => 'Стандартная страница'
        ];
        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['modules']['Materials'])) {

            foreach ($conf['files']['modules']['Materials'] as $file) {
                if ($file['type'] == 'Material') {
                    $return[$file['file']] = $file['name'];
                }
            }
        }
        return $return;
    }

    function templatesList() {
        $return = [
            'inherit' => 'Как у родителя',
            'current' => 'Текущая тема'
        ];

        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['aditionTemplateFiels'])) {
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
                if ($file['type'] == 'Material') {
                    $return[$file['file']] = '- ' . $file['name'];
                }
            }
        }
        return $return;
    }

    function viewsCategoryList() {
        $return = [
            'inherit' => 'Как у родителя',
            'category' => 'Стандартная категория',
        ];
        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['modules']['Materials'])) {

            foreach ($conf['files']['modules']['Materials'] as $file) {
                if ($file['type'] == 'Category') {
                    $return[$file['file']] = $file['name'];
                }
            }
        }
        return $return;
    }

    function templatesCategoryList() {
        $return = [
            'inherit' => 'Как у родителя',
            'current' => 'Текущая тема'
        ];

        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['aditionTemplateFiels'])) {
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
                if ($file['type'] == 'Category') {
                    $return[$file['file']] = '- ' . $file['name'];
                }
            }
        }
        return $return;
    }

}

?>
<commit_msg>undefined fix<commit_after><?php

class Materials extends Module {

    function viewsList() {
        $return = [
            'inherit' => 'Как у родителя',
            'default' => 'Стандартная страница'
        ];
        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['modules']['Materials'])) {

            foreach ($conf['files']['modules']['Materials'] as $file) {
                if (!empty($file['type']) && $file['type'] == 'Material') {
                    $return[$file['file']] = $file['name'];
                }
            }
        }
        return $return;
    }

    function templatesList() {
        $return = [
            'inherit' => 'Как у родителя',
            'current' => 'Текущая тема'
        ];

        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['aditionTemplateFiels'])) {
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
                if ($file['type'] == 'Material') {
                    $return[$file['file']] = '- ' . $file['name'];
                }
            }
        }
        return $return;
    }

    function viewsCategoryList() {
        $return = [
            'inherit' => 'Как у родителя',
            'category' => 'Стандартная категория',
        ];
        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['modules']['Materials'])) {

            foreach ($conf['files']['modules']['Materials'] as $file) {
                if ($file['type'] == 'Category') {
                    $return[$file['file']] = $file['name'];
                }
            }
        }
        return $return;
    }

    function templatesCategoryList() {
        $return = [
            'inherit' => 'Как у родителя',
            'current' => 'Текущая тема'
        ];

        $conf = App::$primary->view->template->config;

        if (!empty($conf['files']['aditionTemplateFiels'])) {
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
                if ($file['type'] == 'Category') {
                    $return[$file['file']] = '- ' . $file['name'];
                }
            }
        }
        return $return;
    }

}

?>

{'fraction_non_alphanumeric': 0.18799546998867497, 'fraction_numerical': 0.0, 'mean_word_length': 1.644311377245509, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, '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': '4997106', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1229, 'n_words': 212}