Code Duplication    Length = 3-3 lines in 2 locations

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

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

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

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