<commit_before><?php

namespace DatabaseLog\Test\TestCase\Shell;

use Cake\Console\ConsoleIo;
use Cake\Core\Configure;
use Cake\Log\Log;
use Cake\ORM\TableRegistry;
use DatabaseLog\Shell\DatabaseLogShell;
use Tools\TestSuite\ConsoleOutput;
use Tools\TestSuite\TestCase;

/**
 */
class DatabaseLogShellTest extends TestCase {

	/**
	 * @var array
	 */
	public $fixtures = [
		'plugin.database_log.database_logs'
	];

	/**
	 * @var \DatabaseLog\Shell\DatabaseLogShell|\PHPUnit_Framework_MockObject_MockObject
	 */
	protected $Shell;

	/**
	 * @var \DatabaseLog\Model\Table\DatabaseLogsTable
	 */
	protected $Logs;

	/**
	 * @var ConsoleOutput
	 */
	protected $out;

	/**
	 * @var ConsoleOutput
	 */
	protected $err;

	/**
	 * @return void
	 */
	public function setUp() {
		parent::setUp();

		if (!is_dir(LOGS)) {
			mkdir(LOGS, 0770, true);
		}

		Configure::delete('DatabaseLog');
		Configure::write('DatabaseLog.monitor', ['info']);
		Configure::write('DatabaseLog.notificationInterval', MINUTE);

		$this->out = new ConsoleOutput();
		$this->err = new ConsoleOutput();
		$io = new ConsoleIo($this->out, $this->err);

		$this->Shell = $this->getMockBuilder(DatabaseLogShell::class)
			->setMethods(['in', '_stop'])
			->setConstructorArgs([$io])
			->getMock();

		$this->Logs = TableRegistry::get('DatabaseLog.DatabaseLogs');
		$this->Logs->truncate();
	}
<commit_msg>Fix CS<commit_after><?php

namespace DatabaseLog\Test\TestCase\Shell;

use Cake\Console\ConsoleIo;
use Cake\Core\Configure;
use Cake\Log\Log;
use Cake\ORM\TableRegistry;
use DatabaseLog\Shell\DatabaseLogShell;
use Tools\TestSuite\ConsoleOutput;
use Tools\TestSuite\TestCase;

/**
 */
class DatabaseLogShellTest extends TestCase {

	/**
	 * @var array
	 */
	public $fixtures = [
		'plugin.database_log.database_logs'
	];

	/**
	 * @var \DatabaseLog\Shell\DatabaseLogShell|\PHPUnit_Framework_MockObject_MockObject
	 */
	protected $Shell;

	/**
	 * @var \DatabaseLog\Model\Table\DatabaseLogsTable
	 */
	protected $Logs;

	/**
	 * @var \Tools\TestSuite\ConsoleOutput
	 */
	protected $out;

	/**
	 * @var \Tools\TestSuite\ConsoleOutput
	 */
	protected $err;

	/**
	 * @return void
	 */
	public function setUp() {
		parent::setUp();

		if (!is_dir(LOGS)) {
			mkdir(LOGS, 0770, true);
		}

		Configure::delete('DatabaseLog');
		Configure::write('DatabaseLog.monitor', ['info']);
		Configure::write('DatabaseLog.notificationInterval', MINUTE);

		$this->out = new ConsoleOutput();
		$this->err = new ConsoleOutput();
		$io = new ConsoleIo($this->out, $this->err);

		$this->Shell = $this->getMockBuilder(DatabaseLogShell::class)
			->setMethods(['in', '_stop'])
			->setConstructorArgs([$io])
			->getMock();

		$this->Logs = TableRegistry::get('DatabaseLog.DatabaseLogs');
		$this->Logs->truncate();
	}

{'fraction_non_alphanumeric': 0.17130466208890496, 'fraction_numerical': 0.0028912179255511385, 'mean_word_length': 4.302681992337165, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '816364', 'n_tokens_mistral': 1016, 'n_tokens_neox': 911, 'n_words': 155}