<commit_before><?php

/**
 * @package         Billing
 * @copyright       Copyright (C) 2012-2016 BillRun Technologies Ltd. All rights reserved.
 * @license         GNU Affero General Public License Version 3; see LICENSE.txt
 */
	
/**
 * This class represents an invalid field.
 *
 * @package  DataTypes
 * @since    5.2
 */
class Billrun_DataTypes_InvalidField {

	/**
	 * The field name
	 * @var string
	 */
	protected $fieldName = null;

	/**
	 * Field error code
	 * @var Error code
	 * @toto validate this value somehow.
	 */
	protected $error = null;

	/**
	 * Create a new instance of the invalid field class.
	 * @param string $fieldName - Name of the field
	 * @param int $errorCode - The error. Empty mendatory by default.
	 */
	public function __construct($fieldName, $errorCode=1) {
		$this->fieldName = $fieldName;
		$this->error = $errorCode;
	}
	
	/**
	 * Return the error data
	 * @return array
	 */
	public function output() {
		return array($this->fieldName => $this->error);
	}
}<commit_msg>Changed the layout of the invalid field exception<commit_after><?php

/**
 * @package         Billing
 * @copyright       Copyright (C) 2012-2016 BillRun Technologies Ltd. All rights reserved.
 * @license         GNU Affero General Public License Version 3; see LICENSE.txt
 */
	
/**
 * This class represents an invalid field.
 *
 * @package  DataTypes
 * @since    5.2
 */
class Billrun_DataTypes_InvalidField {

	/**
	 * The field name
	 * @var string
	 */
	protected $fieldName = null;

	/**
	 * Field error code
	 * @var Error code
	 * @toto validate this value somehow.
	 */
	protected $error = null;

	/**
	 * Create a new instance of the invalid field class.
	 * @param string $fieldName - Name of the field
	 * @param int $errorCode - The error. Empty mendatory by default.
	 */
	public function __construct($fieldName, $errorCode=1) {
		$this->fieldName = $fieldName;
		$this->error = $errorCode;
	}
	
	/**
	 * Return the error data
	 * @return array
	 */
	public function output() {
		return array('name' => $this->fieldName, 'error' => $this->error);
	}
}
{'fraction_non_alphanumeric': 0.12181030332209918, 'fraction_numerical': 0.011555127587867116, 'mean_word_length': 2.9430740037950662, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '3942622', 'n_tokens_mistral': 672, 'n_tokens_neox': 606, 'n_words': 213}