<commit_before><?php

namespace Dock\System;

class OS
{
    const MAC = 1;
    const LINUX = 2;
    const WINDOWS = 3;

    /**
     * @return int Current Operating System
     */
    public function get()
    {
        $uname = strtolower(php_uname('s'));

        switch ($uname) {
            case 'darwin':
                return self::MAC;
            case 'linux':
                return self::LINUX;
            case 'win':
                return self::WINDOWS;
            default:
                throw new \Exception("'$uname' is not a known operating system.");
        }
    }

    public function createNewShell()
    {
        switch ($this->get()) {
            case self::MAC:
                pcntl_exec(getenv('SHELL'));
            case self::LINUX:
                pcntl_exec('/bin/su', array(get_current_user()));
            default:
                throw new \Exception('Unsupported operating system');
        }
    }
}<commit_msg>Now with fewer password-prompts<commit_after><?php

namespace Dock\System;

class OS
{
    const MAC = 1;
    const LINUX = 2;
    const WINDOWS = 3;

    /**
     * @return int Current Operating System
     */
    public function get()
    {
        $uname = strtolower(php_uname('s'));

        switch ($uname) {
            case 'darwin':
                return self::MAC;
            case 'linux':
                return self::LINUX;
            case 'win':
                return self::WINDOWS;
            default:
                throw new \Exception("'$uname' is not a known operating system.");
        }
    }

    public function createNewShell()
    {
        switch ($this->get()) {
            case self::MAC:
                pcntl_exec(getenv('SHELL'));
            case self::LINUX:
                pcntl_exec('/usr/bin/sudo', array('su', get_current_user()));
            default:
                throw new \Exception('Unsupported operating system');
        }
    }
}
{'fraction_non_alphanumeric': 0.12010309278350516, 'fraction_numerical': 0.003092783505154639, 'mean_word_length': 1.517509727626459, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6371597', 'n_tokens_mistral': 562, 'n_tokens_neox': 531, 'n_words': 136}