<commit_before><?php

use Symfony\Component\Finder\SplFileInfo;
use Twig\TwigFunction;

return [
    /** Theme specific Twig functions */
    'functions' => [
        new TwigFunction('icon', function (SplFileInfo $file) {
            $icons = require __DIR__ . '/icons.php';

            $icon = $file->isDir() ? 'fas fa-folder'
                : $icons[$file->getExtension()] ?? 'fas fa-file';

            return "<i class=\"{$icon} fa-fw fa-lg\"></i>";
        }),

        /**
         * Retrieve an item from the theme config.
         *
         * @param string $key
         * @param mixed  $default
         *
         * @return mixed
         */
        new TwigFunction('config', function (string $key, $default = null) {
            $config = require __DIR__ . '/config.php';

            foreach (explode('.', $key) as $k) {
                if (! isset($config[$k])) {<commit_msg>Added docblock to icon theme function<commit_after><?php

use Symfony\Component\Finder\SplFileInfo;
use Twig\TwigFunction;

return [
    /** Theme specific Twig functions */
    'functions' => [
        /**
         * Return the icon markup for a given file.
         *
         * @param SplFileInfo $file
         *
         * @return string
         */
        new TwigFunction('icon', function (SplFileInfo $file) {
            $icons = require __DIR__ . '/icons.php';

            $icon = $file->isDir() ? 'fas fa-folder'
                : $icons[$file->getExtension()] ?? 'fas fa-file';

            return "<i class=\"{$icon} fa-fw fa-lg\"></i>";
        }),

        /**
         * Retrieve an item from the theme config.
         *
         * @param string $key
         * @param mixed  $default
         *
         * @return mixed
         */
        new TwigFunction('config', function (string $key, $default = null) {
            $config = require __DIR__ . '/config.php';

            foreach (explode('.', $key) as $k) {
                if (! isset($config[$k])) {
{'fraction_non_alphanumeric': 0.15126903553299492, 'fraction_numerical': 0.0, 'mean_word_length': 1.7037037037037037, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '1341852', 'n_tokens_mistral': 573, 'n_tokens_neox': 566, 'n_words': 148}