<commit_before><?php

class Controller_api_driver_onboarding extends Crunchbutton_Controller_Rest {

	public function init() {

		if ( c::getPagePiece( 3 ) && $this->method() == 'get' ) {
			switch ( c::getPagePiece( 3 ) ) {
				case 'vehicles':
					$out = [];
					$out[ 'options' ] = Cockpit_Admin::vehicleOptions();
					$out[ 'default' ] = Cockpit_Admin::vehicleDefault();
					echo json_encode( $out );exit();
					break;
				case 'phone_types':
					$out = [];
					$out[ 'options' ] = Cockpit_Driver_Info::phoneTypes();
					$out[ 'iphone_options' ] = Cockpit_Driver_Info::iPhoneTypes();
					$out[ 'android_options' ] = Cockpit_Driver_Info::androidTypes();
					$out[ 'android_versions' ] = Cockpit_Driver_Info::androidVersion();
					$out[ 'default' ] = Cockpit_Driver_Info::phoneTypeDefault();
					echo json_encode( $out );exit();
					break;
				case 'carrier_types':
					$out = [];
					$out[ 'options' ] = Cockpit_Driver_Info::carrierTypes();
					$out[ 'other' ] = Cockpit_Driver_Info::carrierTypeOther();
					echo json_encode( $out );exit();
					break;
                case 'tshirt_sizes':
					$out = [];
					$out[ 'tshirt_options' ] = Cockpit_Driver_Info::tshirtSizes();
					echo json_encode( $out );exit();
					break;
				case 'defaults':
					$out = [];
					// See #5173
					$out[ 'referral_admin_credit' ] = 4;
					$out[ 'referral_customer_credit' ] = 3;
					echo json_encode( $out );exit();
					break;
				case 'tshirt_sizes':<commit_msg>Make default value for referral admin credit 7 (currently it's 4) #5549<commit_after><?php

class Controller_api_driver_onboarding extends Crunchbutton_Controller_Rest {

	public function init() {

		if ( c::getPagePiece( 3 ) && $this->method() == 'get' ) {
			switch ( c::getPagePiece( 3 ) ) {
				case 'vehicles':
					$out = [];
					$out[ 'options' ] = Cockpit_Admin::vehicleOptions();
					$out[ 'default' ] = Cockpit_Admin::vehicleDefault();
					echo json_encode( $out );exit();
					break;
				case 'phone_types':
					$out = [];
					$out[ 'options' ] = Cockpit_Driver_Info::phoneTypes();
					$out[ 'iphone_options' ] = Cockpit_Driver_Info::iPhoneTypes();
					$out[ 'android_options' ] = Cockpit_Driver_Info::androidTypes();
					$out[ 'android_versions' ] = Cockpit_Driver_Info::androidVersion();
					$out[ 'default' ] = Cockpit_Driver_Info::phoneTypeDefault();
					echo json_encode( $out );exit();
					break;
				case 'carrier_types':
					$out = [];
					$out[ 'options' ] = Cockpit_Driver_Info::carrierTypes();
					$out[ 'other' ] = Cockpit_Driver_Info::carrierTypeOther();
					echo json_encode( $out );exit();
					break;
                case 'tshirt_sizes':
					$out = [];
					$out[ 'tshirt_options' ] = Cockpit_Driver_Info::tshirtSizes();
					echo json_encode( $out );exit();
					break;
				case 'defaults':
					$out = [];
					// See #5173
					$out[ 'referral_admin_credit' ] = 7;
					$out[ 'referral_customer_credit' ] = 3;
					echo json_encode( $out );exit();
					break;
				case 'tshirt_sizes':
{'fraction_non_alphanumeric': 0.16389073950699534, 'fraction_numerical': 0.0073284477015323115, 'mean_word_length': 3.46875, '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': '2893222', 'n_tokens_mistral': 1310, 'n_tokens_neox': 990, 'n_words': 202}