Code Duplication    Length = 7-8 lines in 2 locations

includes/api/ApiFormatJson.php 2 locations

@@ 68-75 (lines=8) @@
65
			$transform = [];
66
		} else {
67
			switch ( $params['formatversion'] ) {
68
				case 1:
69
					$opt |= $params['utf8'] ? FormatJson::ALL_OK : FormatJson::XMLMETA_OK;
70
					$transform = [
71
						'BC' => [],
72
						'Types' => [ 'AssocAsObject' => true ],
73
						'Strip' => 'all',
74
					];
75
					break;
76
77
				case 2:
78
				case 'latest':
@@ 78-84 (lines=7) @@
75
					break;
76
77
				case 2:
78
				case 'latest':
79
					$opt |= $params['ascii'] ? FormatJson::XMLMETA_OK : FormatJson::ALL_OK;
80
					$transform = [
81
						'Types' => [ 'AssocAsObject' => true ],
82
						'Strip' => 'all',
83
					];
84
					break;
85
86
				default:
87
					$this->dieUsage( __METHOD__ .