Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 58-66 (lines=9) @@
55
56
	// public $response_format =& $this->post_object_format;
57
58
	function __construct( $args ) {
59
		if ( is_array( $this->post_object_format ) && isset( $this->post_object_format['format'] ) ) {
60
			$this->post_object_format['format'] = get_post_format_strings();
61
		}
62
		if ( !$this->response_format ) {
63
			$this->response_format =& $this->post_object_format;
64
		}
65
		parent::__construct( $args );
66
	}
67
68
	function is_metadata_public( $key ) {
69
		if ( empty( $key ) )

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

@@ 59-67 (lines=9) @@
56
57
	// public $response_format =& $this->post_object_format;
58
59
	function __construct( $args ) {
60
		if ( is_array( $this->post_object_format ) && isset( $this->post_object_format['format'] ) ) {
61
			$this->post_object_format['format'] = get_post_format_strings();
62
		}
63
		if ( !$this->response_format ) {
64
			$this->response_format =& $this->post_object_format;
65
		}
66
		parent::__construct( $args );
67
	}
68
69
	/**
70
	 * Get a post by a specified field and value