<commit_before><?php

/**
 * Copyright © 2012-2015 by <NAME> (<EMAIL>)
 * Distributed under the terms of the MIT License, see LICENSE
 */

/**
 *
 * @package Core
 */
namespace NoreSources;

interface ReporterInterface
{

	function addMessage($level, $object, $message, $file, $line);

	function handleFatalError();
}

class Reporter
{
	const DEBUGMSG = 0x1;
	const NOTICE = 0x2;
	const WARNING = 0x4;
	const ERROR = 0x8;
	const FATAL_ERROR = 0xA;
	const ALL_MESSAGES = 0xFF;

	public static function setImplementation(ReporterInterface &$impl)
	{
		self::$m_implementation = $impl;
	}

	public static function debug($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::DEBUGMSG, $object, $message);
	}

	public static function notice($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::NOTICE, $object, $message);
	}

	public static function warning($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::WARNING, $object, $message);
	}

	public static function error($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::ERROR, $object, $message);
	}

	public static function fatalError($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::FATAL_ERROR, $object, $message);
		self::$m_implementation->handleFatalError();
		die();
	}

	private static function addMessage($level, $object, $message, $file = null, $line = null)
	{
		if (self::$m_implementation)
		{
			self::$m_implementation->addMessage($level, $object, $message, $file, $line);
		}
	}

	/**
	 *
	 * @var ReporterInterface
	 */
	private static $m_implementation;
}

class DummyReporterInterface implements ReporterInterface
{

	function addMessage($level, $object, $message, $file, $line)
	{
	}

	function handleFatalError()
	{
	}
}
<commit_msg>fix missing file/line parameter in Reportor<commit_after><?php

/**
 * Copyright © 2012-2015 by <NAME> (<EMAIL>)
 * Distributed under the terms of the MIT License, see LICENSE
 */

/**
 *
 * @package Core
 */
namespace NoreSources;

interface ReporterInterface
{

	function addMessage($level, $object, $message, $file, $line);

	function handleFatalError();
}

class Reporter
{
	const DEBUGMSG = 0x1;
	const NOTICE = 0x2;
	const WARNING = 0x4;
	const ERROR = 0x8;
	const FATAL_ERROR = 0xA;
	const ALL_MESSAGES = 0xFF;

	public static function setImplementation(ReporterInterface &$impl)
	{
		self::$m_implementation = $impl;
	}

	public static function debug($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::DEBUGMSG, $object, $message, $file, $line);
	}

	public static function notice($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::NOTICE, $object, $message, $file, $line);
	}

	public static function warning($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::WARNING, $object, $message, $file, $line);
	}

	public static function error($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::ERROR, $object, $message, $file, $line);
	}

	public static function fatalError($object, $message, $file = null, $line = null)
	{
		self::addMessage(self::FATAL_ERROR, $object, $message, $file, $line);
		self::$m_implementation->handleFatalError();
		die();
	}

	private static function addMessage($level, $object, $message, $file = null, $line = null)
	{
		if (self::$m_implementation)
		{
			self::$m_implementation->addMessage($level, $object, $message, $file, $line);
		}
	}

	/**
	 *
	 * @var ReporterInterface
	 */
	private static $m_implementation;
}

class DummyReporterInterface implements ReporterInterface
{

	function addMessage($level, $object, $message, $file, $line)
	{
	}

	function handleFatalError()
	{
	}
}

{'fraction_non_alphanumeric': 0.15115034777956127, 'fraction_numerical': 0.009630818619582664, 'mean_word_length': 4.851330203442879, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '4385969', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1236, 'n_words': 323}