<commit_before><?php

namespace Datatype\Traits;

trait MethodMapperTrait
{
	abstract protected static function _function_prefix();

	abstract protected function &_get_object_data();


	public function __call( $method, $args )
	{
		$prefix = static::_function_prefix();
		$function = $prefix . $method;

		//! is_array( $args ) && $args = [$args];

		if ( function_exists( $function ) )
		{
			$data = $this->_get_object_data();
			$args = array_merge( [&$data], $args );

			return call_user_func_array( $function, $args );
		}
		else
		{
			$trace = debug_backtrace();
			trigger_error(<commit_msg>Remove unnecessary piece of commented out code<commit_after><?php

namespace Datatype\Traits;

trait MethodMapperTrait
{
	abstract protected static function _function_prefix();

	abstract protected function &_get_object_data();


	public function __call( $method, $args )
	{
		$prefix = static::_function_prefix();
		$function = $prefix . $method;

		if ( function_exists( $function ) )
		{
			$data = $this->_get_object_data();
			$args = array_merge( [&$data], $args );

			return call_user_func_array( $function, $args );
		}
		else
		{
			$trace = debug_backtrace();
			trigger_error(
{'fraction_non_alphanumeric': 0.13468013468013468, 'fraction_numerical': 0.0, 'mean_word_length': 4.404545454545454, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1196491', 'n_tokens_mistral': 426, 'n_tokens_neox': 380, 'n_words': 91}