<commit_before><?php

namespace wcf\system\style;

use ScssPhp\ScssPhp\Compiler;
use ScssPhp\ScssPhp\OutputStyle;
use ScssPhp\ScssPhp\ValueConverter;
use wcf\data\application\Application;
use wcf\data\option\Option;
use wcf\data\style\Style;
use wcf\system\application\ApplicationHandler;
use wcf\system\event\EventHandler;
use wcf\system\exception\SystemException;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
use wcf\util\FileUtil;
use wcf\util\JSON;
use wcf\util\StringUtil;
use wcf\util\StyleUtil;
use wcf\util\Url;

/**
 * Provides access to the SCSS PHP compiler.
 *
 * @author  <NAME>, <NAME>
 * @copyright   2001-2021 WoltLab GmbH
 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package WoltLabSuite\Core\System\Style
 */
final class StyleCompiler extends SingletonFactory
{
    /**
     * Contains all files, which are compiled for a style.
     * @var string[]
     */
    protected $files;

    /**
     * names of option types which are supported as additional variables
     * @var string[]
     */
    public static $supportedOptionType = ['boolean', 'float', 'integer', 'radioButton', 'select'];

    /**
     * file used to store global SCSS declarations, relative to `WCF_DIR`
     * @var string
     */
    const FILE_GLOBAL_VALUES = 'style/ui/zzz_wsc_style_global_values.scss';

    /**
     * registry keys for data storage
     * @var string
     */
    const REGISTRY_GLOBAL_VALUES = 'styleGlobalValues';

    public const SYSTEM_FONT_NAME = 'system';

    public const SYSTEM_FONT_FAMILY = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
        "Helvetica Neue", Arial, sans-serif';

    public const SYSTEM_FONT_FAMILY_MONOSPACE = 'ui-monospace, Menlo, Monaco, "Cascadia Mono",
        "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
        "Fira Mono", "Droid Sans Mono", "Courier New", monospace';

    /**
     * @inheritDoc
     */
    protected function init()
    {
        require_once(WCF_DIR . 'lib/system/style/scssphp/scss.inc.php');
    }

    /**
     * Returns a fresh instance of the scssphp compiler.
     */
    protected function makeCompiler(): Compiler
    {
        $compiler = new Compiler();
        $compiler->setImportPaths([WCF_DIR]);

        if (\ENABLE_DEBUG_MODE && \ENABLE_DEVELOPER_TOOLS) {
            $compiler->setOutputStyle(OutputStyle::EXPANDED);
        } else {
            $compiler->setOutputStyle(OutputStyle::COMPRESSED);
        }<commit_msg>Remove include of deprecated scss.inc.php in StyleCompiler<commit_after><?php

namespace wcf\system\style;

use ScssPhp\ScssPhp\Compiler;
use ScssPhp\ScssPhp\OutputStyle;
use ScssPhp\ScssPhp\ValueConverter;
use wcf\data\application\Application;
use wcf\data\option\Option;
use wcf\data\style\Style;
use wcf\system\application\ApplicationHandler;
use wcf\system\event\EventHandler;
use wcf\system\exception\SystemException;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
use wcf\util\FileUtil;
use wcf\util\JSON;
use wcf\util\StringUtil;
use wcf\util\StyleUtil;
use wcf\util\Url;

/**
 * Provides access to the SCSS PHP compiler.
 *
 * @author  <NAME>, <NAME>
 * @copyright   2001-2021 WoltLab GmbH
 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package WoltLabSuite\Core\System\Style
 */
final class StyleCompiler extends SingletonFactory
{
    /**
     * Contains all files, which are compiled for a style.
     * @var string[]
     */
    protected $files;

    /**
     * names of option types which are supported as additional variables
     * @var string[]
     */
    public static $supportedOptionType = ['boolean', 'float', 'integer', 'radioButton', 'select'];

    /**
     * file used to store global SCSS declarations, relative to `WCF_DIR`
     * @var string
     */
    const FILE_GLOBAL_VALUES = 'style/ui/zzz_wsc_style_global_values.scss';

    /**
     * registry keys for data storage
     * @var string
     */
    const REGISTRY_GLOBAL_VALUES = 'styleGlobalValues';

    public const SYSTEM_FONT_NAME = 'system';

    public const SYSTEM_FONT_FAMILY = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
        "Helvetica Neue", Arial, sans-serif';

    public const SYSTEM_FONT_FAMILY_MONOSPACE = 'ui-monospace, Menlo, Monaco, "Cascadia Mono",
        "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
        "Fira Mono", "Droid Sans Mono", "Courier New", monospace';

    /**
     * Returns a fresh instance of the scssphp compiler.
     */
    protected function makeCompiler(): Compiler
    {
        $compiler = new Compiler();
        $compiler->setImportPaths([WCF_DIR]);

        if (\ENABLE_DEBUG_MODE && \ENABLE_DEVELOPER_TOOLS) {
            $compiler->setOutputStyle(OutputStyle::EXPANDED);
        } else {
            $compiler->setOutputStyle(OutputStyle::COMPRESSED);
        }
{'fraction_non_alphanumeric': 0.12112288967412642, 'fraction_numerical': 0.0031409501374165686, 'mean_word_length': 3.3214588634435964, 'pattern_counts': {'":': 0, '<': 11, '<?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': '6271578', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1614, 'n_words': 402}