<commit_before><?php

namespace Nacha\Record;

use Nacha\Field\String;
use Nacha\Field\Number;
use Nacha\Field\RoutingNumber;
use Nacha\Field\FileIdModifier;

class FileHeader {

	private $recordTypeCode;
	private $priorityCode;
	private $immediateDestination;
	private $immediateOrigin;
	private $fileCreationDate;
	private $fileCreationTime;
	private $fileIdModifier;
	private $recordSize;
	private $blockingFactor;
	private $formatCode;
	private $immediateDestinationName;
	private $immediateOriginName;
	private $referenceCode;

	public function __construct() {
		// defaults
		$this->setRecordTypeCode(1);
		$this->setRecordSize(94);
		$this->setBlockingFactor(10);
		$this->setFormatCode(1);
		$this->setFileIdModifier('A');
		$this->setFileCreationDate(date('ymd', time()));

		// optional
		$this->setImmediateDestinationName('');
		$this->setImmediateOriginName('');
		$this->setReferenceCode('');
		$this->setFileCreationTime('');
	}

	public function setRecordTypeCode($recordTypeCode) {
		$this->recordTypeCode = new Number($recordTypeCode, 1);
		return $this;
	}
	public function setPriorityCode($priorityCode) {
		$this->priorityCode = new Number($priorityCode, 2);
		return $this;
	}
	public function setImmediateDestination($immediateDestination) {
		$this->immediateDestination = new RoutingNumber($immediateDestination);
		return $this;
	}
	public function setImmediateOrigin($immediateOrigin) {
		$this->immediateOrigin = new RoutingNumber($immediateOrigin);<commit_msg>Hardcoding file header type<commit_after><?php

namespace Nacha\Record;

use Nacha\Field\String;
use Nacha\Field\Number;
use Nacha\Field\RoutingNumber;
use Nacha\Field\FileIdModifier;

class FileHeader {

	private $recordTypeCode = 1; // not able to overwrite this 
	private $priorityCode;
	private $immediateDestination;
	private $immediateOrigin;
	private $fileCreationDate;
	private $fileCreationTime;
	private $fileIdModifier;
	private $recordSize;
	private $blockingFactor;
	private $formatCode;
	private $immediateDestinationName;
	private $immediateOriginName;
	private $referenceCode;

	public function __construct() {
		// defaults
		$this->setRecordSize(94);
		$this->setBlockingFactor(10);
		$this->setFormatCode(1);
		$this->setFileIdModifier('A');
		$this->setFileCreationDate(date('ymd', time()));

		// optional
		$this->setImmediateDestinationName('');
		$this->setImmediateOriginName('');
		$this->setReferenceCode('');
		$this->setFileCreationTime('');
	}

	public function setPriorityCode($priorityCode) {
		$this->priorityCode = new Number($priorityCode, 2);
		return $this;
	}
	public function setImmediateDestination($immediateDestination) {
		$this->immediateDestination = new RoutingNumber($immediateDestination);
		return $this;
	}
	public function setImmediateOrigin($immediateOrigin) {
		$this->immediateOrigin = new RoutingNumber($immediateOrigin);
{'fraction_non_alphanumeric': 0.12600349040139616, 'fraction_numerical': 0.005235602094240838, 'mean_word_length': 6.463541666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '1055953', 'n_tokens_mistral': 924, 'n_tokens_neox': 891, 'n_words': 172}