Code Duplication    Length = 3-3 lines in 2 locations

json-endpoints/class.wpcom-json-api-list-posts-endpoint.php 1 location

@@ 85-87 (lines=3) @@
82
			return new WP_Error( 'invalid_number',  'The NUMBER parameter must be less than or equal to 100.', 400 );
83
		}
84
85
		if ( isset( $args['type'] ) && ! $this->is_post_type_allowed( $args['type'] ) ) {
86
			return new WP_Error( 'unknown_post_type', 'Unknown post type', 404 );
87
		}
88
89
		// Normalize post_type
90
		if ( isset( $args['type'] ) && 'any' == $args['type'] ) {

json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php 1 location

@@ 96-98 (lines=3) @@
93
			$this->load_theme_functions();
94
		}
95
96
		if ( isset( $args['type'] ) && ! $site->is_post_type_allowed( $args['type'] ) ) {
97
			return new WP_Error( 'unknown_post_type', 'Unknown post type', 404 );
98
		}
99
100
		// Normalize post_type
101
		if ( isset( $args['type'] ) && 'any' == $args['type'] ) {