Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 371-375 (lines=5) @@
368
					break;
369
				case 'default_sharing_status' :
370
					$default_sharing_status = false;
371
					if ( class_exists( 'Sharing_Service' ) ) {
372
						$ss                     = new Sharing_Service();
373
						$blog_services          = $ss->get_blog_services();
374
						$default_sharing_status = ! empty( $blog_services['visible'] );
375
					}
376
					$options[ $key ] = (bool) $default_sharing_status;
377
					break;
378
				case 'default_comment_status' :

sal/class.json-api-site-base.php 1 location

@@ 451-455 (lines=5) @@
448
449
	function get_default_sharing_status() {
450
		$default_sharing_status = false;
451
		if ( class_exists( 'Sharing_Service' ) ) {
452
			$ss                     = new Sharing_Service();
453
			$blog_services          = $ss->get_blog_services();
454
			$default_sharing_status = ! empty( $blog_services['visible'] );
455
		}
456
		return (bool) $default_sharing_status;
457
	}
458