<commit_before><?php
namespace Kir\Logging\Essentials\Filters;

use Kir\Logging\Essentials\Common\AbstractLogger;
use Kir\Logging\Essentials\Common\AbstractLoggerAware;
use Kir\Logging\Essentials\Tools\LogLevelTranslator;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;

class LogLevelRangeFilterProxy extends AbstractLoggerAware {
	/**
	 * @var int
	 */
	private $minLevel = null;

	/**
	 * @var int
	 */
	private $maxLevel = null;

	/**
	 * @param LoggerInterface $logger
	 * @param string $minLevel
	 * @param string $maxLevel
	 */
	public function __construct(LoggerInterface $logger, $minLevel = LogLevel::DEBUG, $maxLevel = LogLevel::EMERGENCY) {
		parent::__construct($logger);
		$this->minLevel = 7 - LogLevelTranslator::getLevelNo($minLevel);
		$this->maxLevel = 7 - LogLevelTranslator::getLevelNo($maxLevel);
	}

	/**
	 * Logs with an arbitrary level.
	 * @param mixed $psrLevel
	 * @param string $message
	 * @param array $context
	 * @return $this
	 */
	public function log($psrLevel, $message, array $context = array()) {
		$level = 7 - LogLevelTranslator::getLevelNo($psrLevel);
		if($this->minLevel <= $level && $this->maxLevel >= $level) {
			$this->logger()->log($psrLevel, $message, $context);
		}
		return $this;
	}
}<commit_msg>Various changes<commit_after><?php
namespace Kir\Logging\Essentials\Filters;

use Kir\Logging\Essentials\Common\AbstractLoggerAware;
use Kir\Logging\Essentials\Tools\LogLevelTranslator;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;

class LogLevelRangeFilterProxy extends AbstractLoggerAware {
	/**
	 * @var int
	 */
	private $minLevel = null;

	/**
	 * @var int
	 */
	private $maxLevel = null;

	/**
	 * @param LoggerInterface $logger
	 * @param string $minLevel
	 * @param string $maxLevel
	 */
	public function __construct(LoggerInterface $logger, $minLevel = LogLevel::DEBUG, $maxLevel = LogLevel::EMERGENCY) {
		parent::__construct($logger);
		$this->minLevel = 7 - LogLevelTranslator::getLevelNo($minLevel);
		$this->maxLevel = 7 - LogLevelTranslator::getLevelNo($maxLevel);
	}

	/**
	 * Logs with an arbitrary level.
	 * @param mixed $psrLevel
	 * @param string $message
	 * @param array $context
	 * @return $this
	 */
	public function log($psrLevel, $message, array $context = array()) {
		$level = 7 - LogLevelTranslator::getLevelNo($psrLevel);
		if($this->minLevel <= $level && $this->maxLevel >= $level) {
			$this->logger()->log($psrLevel, $message, $context);
		}
		return $this;
	}
}
{'fraction_non_alphanumeric': 0.14792176039119803, 'fraction_numerical': 0.0024449877750611247, 'mean_word_length': 4.579545454545454, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '6035634', 'n_tokens_mistral': 861, 'n_tokens_neox': 799, 'n_words': 171}