<commit_before><?php
namespace App\Shell\Task;

use Cake\Console\Shell;

class ExecTask extends Shell {
    public function main() {

    }

    public function run($command, $su = false) {

        if ($su == false){
            $ret = $this->out(exec("$command", $out, $err));
        }else{
            $ret = exec("su vagrant -c \"$command\"", $out, $err);
        }

        if($err){
            $this->out("Error executing command '$command'");
            exit(1);
        }
    }

}<commit_msg>Fixes PHPCS<commit_after><?php
namespace App\Shell\Task;

use Cake\Console\Shell;

class ExecTask extends Shell {

/**
 * run() executes a command as either root or vagrant user.
 *
 * @param string $command containing full path and connabd arguments, options
 * @param bool $su set to false to run as root, true to run as vagrant user
 * @return int $err containing exit code of executed command
 */
	public function run($command, $su = false) {
		if ($su == false) {
			$ret = $this->out(exec("$command", $out, $err));
		} else {
			$ret = exec("su vagrant -c \"$command\"", $out, $err);
		}

		if ($err) {
			$this->out("Error executing command '$command'");
			exit(1);
		}
	}

}
{'fraction_non_alphanumeric': 0.16104553119730186, 'fraction_numerical': 0.0016863406408094434, 'mean_word_length': 2.7210031347962382, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3715699', 'n_tokens_mistral': 402, 'n_tokens_neox': 377, 'n_words': 120}