<commit_before><?php

namespace Alfred\Workflows;

class Alfred
{
    protected $envPrefix = 'alfred_';

    public function preferences()
    {
        return $this->get('preferences');
    }

    public function preferencesLocalhash()
    {
        return $this->get('preferences_localhash');
    }

    public function theme()
    {
        return $this->get('theme');
    }

    public function themeBackground()
    {
        return $this->get('theme_background');
    }

    public function themeSelectionBackground()
    {
        return $this->get('theme_selection_background');
    }

    public function themeSubtext()
    {
        return $this->get('theme_subtext');
    }

    public function version()
    {
        return $this->get('version');
    }

    public function versionBuild()
    {
        return $this->get('version_build');
    }

    public function workflowBundleid()
    {
        return $this->get('workflow_bundleid');
    }

    public function workflowCache()
    {
        return $this->get('workflow_cache');
    }

    public function workflowData()
    {
        return $this->get('workflow_data');
    }

    public function workflowName()
    {
        return $this->get('workflow_name');
    }

    public function workflowUid()
    {
        return $this->get('workflow_uid');
    }

    public function workflowVersion()
    {
        return $this->get('workflow_version');
    }

    public function debug()
    {
        return $this->get('debug');
    }

    public function debugging()
    {
        return !!$this->debug();
    }

    public function all()
    {
        return array_filter($_SERVER, function ($value, $key) {
            return strpos($key, $this->envPrefix, 0) === 0;
        }, ARRAY_FILTER_USE_BOTH);
    }

    public function get(string $name = null)
    {
        if (!$name) {
            return $this->all();
        }

        // Replace the prefix and add it back on in case they are passing it in
        $name = $this->envPrefix . str_replace($this->envPrefix, '', $name);<commit_msg>alfred env prefix is a constant not a property<commit_after><?php

namespace Alfred\Workflows;

class Alfred
{
    const ENV_PREFIX = 'alfred_';

    public function preferences()
    {
        return $this->get('preferences');
    }

    public function preferencesLocalhash()
    {
        return $this->get('preferences_localhash');
    }

    public function theme()
    {
        return $this->get('theme');
    }

    public function themeBackground()
    {
        return $this->get('theme_background');
    }

    public function themeSelectionBackground()
    {
        return $this->get('theme_selection_background');
    }

    public function themeSubtext()
    {
        return $this->get('theme_subtext');
    }

    public function version()
    {
        return $this->get('version');
    }

    public function versionBuild()
    {
        return $this->get('version_build');
    }

    public function workflowBundleid()
    {
        return $this->get('workflow_bundleid');
    }

    public function workflowCache()
    {
        return $this->get('workflow_cache');
    }

    public function workflowData()
    {
        return $this->get('workflow_data');
    }

    public function workflowName()
    {
        return $this->get('workflow_name');
    }

    public function workflowUid()
    {
        return $this->get('workflow_uid');
    }

    public function workflowVersion()
    {
        return $this->get('workflow_version');
    }

    public function debug()
    {
        return $this->get('debug');
    }

    public function debugging()
    {
        return !!$this->debug();
    }

    public function all()
    {
        return array_filter($_SERVER, function ($value, $key) {
            return strpos($key, self::ENV_PREFIX, 0) === 0;
        }, ARRAY_FILTER_USE_BOTH);
    }

    public function get(string $name = null)
    {
        if (!$name) {
            return $this->all();
        }

        // Replace the prefix and add it back on in case they are passing it in
        $name = self::ENV_PREFIX . str_replace(self::ENV_PREFIX, '', $name);
{'fraction_non_alphanumeric': 0.1290012033694344, 'fraction_numerical': 0.0009626955475330926, 'mean_word_length': 2.246875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 40, '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': '712195', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1163, 'n_words': 267}