<commit_before><?php

class CheckoutStep_Summary extends CheckoutStep{
	
	static $allowed_actions = array(
		'summary',
		'ConfirmationForm',
	);
	
	function summary(){
		$form = $this->ConfirmationForm();
		$this->owner->extend('updateConfirmationForm',$form);
		return array(
			'Form' => $form 
		);
	}
	
	function ConfirmationForm(){
		$cff = CheckoutFieldFactory::singleton();

		$gateway = Checkout::get()->getSelectedPaymentMethod(false);

		$fields = $gateway ? (new GatewayFieldsFactory($gateway))->getFields() : new FieldList();
		$fields->push($cff->getNotesField());

		if($tf = $cff->getTermsConditionsField()){
			$fields->push($tf);
		}
		$actions = new FieldList(<commit_msg>FIX: instantiation chaining isn’t available until PHP5.4<commit_after><?php

class CheckoutStep_Summary extends CheckoutStep{
	
	static $allowed_actions = array(
		'summary',
		'ConfirmationForm',
	);
	
	function summary(){
		$form = $this->ConfirmationForm();
		$this->owner->extend('updateConfirmationForm',$form);
		return array(
			'Form' => $form 
		);
	}
	
	function ConfirmationForm(){
		$cff = CheckoutFieldFactory::singleton();

		$gateway = Checkout::get()->getSelectedPaymentMethod(false);

		$factory = new GatewayFieldsFactory($gateway);
		$fields = $gateway ? $factory->getFields() : new FieldList();
		$fields->push($cff->getNotesField());

		if($tf = $cff->getTermsConditionsField()){
			$fields->push($tf);
		}
		$actions = new FieldList(
{'fraction_non_alphanumeric': 0.16804979253112035, 'fraction_numerical': 0.0013831258644536654, 'mean_word_length': 5.318777292576419, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '4143678', 'n_tokens_mistral': 520, 'n_tokens_neox': 463, 'n_words': 83}