<commit_before><?php

class Shell_Command extends \WP_CLI_Command {

	/**
	 * Interactive PHP console.
	 */
	public function __invoke() {
		\WP_CLI::line( 'Type "exit" to close session.' );

		$repl = new \Boris\Boris( 'wp> ' );
		$repl->start();
	}<commit_msg>fall back to old REPL implementation if Boris is not available<commit_after><?php

class Shell_Command extends \WP_CLI_Command {

	/**
	 * Interactive PHP console.
	 */
	public function __invoke() {
		\WP_CLI::line( 'Type "exit" to close session.' );

		$implementations = array(
			'\\Boris\\Boris',
			'\\WP_CLI\\REPL',
		);

		foreach ( $implementations as $class ) {
			if ( class_exists( $class ) ) {
				$repl = new $class( 'wp> ' );
				$repl->start();
				break;
			}
		}
	}
{'fraction_non_alphanumeric': 0.1641991924629879, 'fraction_numerical': 0.0, 'mean_word_length': 3.110497237569061, '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': '5794475', 'n_tokens_mistral': 303, 'n_tokens_neox': 264, 'n_words': 66}