<commit_before><?php

declare(strict_types=1);

namespace Rusty;

use Symfony\Component\Process\PhpExecutableFinder;

use Rusty\Finder\FilesFinder;

class ExecutionContext
{
    private $target;
    private $disableLint = false;
    private $disableExecute = false;
    private $stopOnError = false;
    private $bootstrapFiles = [];
    private $allowedExtensions = [];

    public function __construct(string $target, array $bootstrapFiles = [], array $allowedExtensions = [])
    {
        $this->target = $target;
        $this->bootstrapFiles = $bootstrapFiles;
        $this->allowedExtensions = $allowedExtensions;
    }

    public function getPhpExecutable(): string
    {
        $executable = (new PhpExecutableFinder())->find();
<commit_msg>Add some documentation for the ExecutionContext<commit_after><?php

declare(strict_types=1);

namespace Rusty;

use Symfony\Component\Process\PhpExecutableFinder;

use Rusty\Finder\FilesFinder;

/**
 * Stores all the runtime execution context.
 *
 * Examples:
 *
 * ```
 * $context = new ExecutionContext('./some/file.php');
 * $context = new ExecutionContext('./some/directory/');
 * ```
 *
 * Bootstrap files can be specified:
 * ```
 * $context = new ExecutionContext('./some/file.php', [
 *   './some/bootstrap/file.php',
 * ]);
 * ```
 *
 * The search can be restricted to some extensions:
 * ```
 * $context = new ExecutionContext('./some/directory/', [], ['php']);
 * ```
 *
 * Some options define what will be checked:
 * ```
 * $context = new ExecutionContext('./some/directory/');
 * $context->disableLint();
 * $context->stopOnError();
 * ```
 */
class ExecutionContext
{
    private $target;
    private $disableLint = false;
    private $disableExecute = false;
    private $stopOnError = false;
    private $bootstrapFiles = [];
    private $allowedExtensions = [];

    public function __construct(string $target, array $bootstrapFiles = [], array $allowedExtensions = [])
    {
        $this->target = $target;
        $this->bootstrapFiles = $bootstrapFiles;
        $this->allowedExtensions = $allowedExtensions;
    }

    public function getPhpExecutable(): string
    {
        $executable = (new PhpExecutableFinder())->find();

{'fraction_non_alphanumeric': 0.1457103949160236, 'fraction_numerical': 0.0009078529278256923, 'mean_word_length': 3.6794055201698512, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5415511', 'n_tokens_mistral': 630, 'n_tokens_neox': 636, 'n_words': 143}