Code Duplication    Length = 8-9 lines in 9 locations

modules/sharedaddy/sharing-sources.php 9 locations

@@ 919-927 (lines=9) @@
916
class Share_Reddit extends Sharing_Source {
917
	public $shortname = 'reddit';
918
	public $icon = '\f222';
919
	public function __construct( $id, array $settings ) {
920
		parent::__construct( $id, $settings );
921
922
		if ( 'official' == $this->button_style ) {
923
			$this->smart = true;
924
		} else {
925
			$this->smart = false;
926
		}
927
	}
928
929
	public function get_name() {
930
		return __( 'Reddit', 'jetpack' );
@@ 509-517 (lines=9) @@
506
class Share_Email extends Sharing_Source {
507
	public $shortname = 'email';
508
	public $icon = '\f410';
509
	public function __construct( $id, array $settings ) {
510
		parent::__construct( $id, $settings );
511
512
		if ( 'official' == $this->button_style ) {
513
			$this->smart = true;
514
		} else {
515
			$this->smart = false;
516
		}
517
	}
518
519
	public function get_name() {
520
		return _x( 'Email', 'as sharing source', 'jetpack' );
@@ 705-713 (lines=9) @@
702
	// 'https://dev.twitter.com/rest/reference/get/help/configuration' ( 2015/02/06 ) short_url_length is 22, short_url_length_https is 23
703
	public $short_url_length = 24;
704
705
	public function __construct( $id, array $settings ) {
706
		parent::__construct( $id, $settings );
707
708
		if ( 'official' == $this->button_style ) {
709
			$this->smart = true;
710
		} else {
711
			$this->smart = false;
712
		}
713
	}
714
715
	public function get_name() {
716
		return __( 'Twitter', 'jetpack' );
@@ 969-977 (lines=9) @@
966
class Share_LinkedIn extends Sharing_Source {
967
	public $shortname = 'linkedin';
968
	public $icon = '\f207';
969
	public function __construct( $id, array $settings ) {
970
		parent::__construct( $id, $settings );
971
972
		if ( 'official' == $this->button_style ) {
973
			$this->smart = true;
974
		} else {
975
			$this->smart = false;
976
		}
977
	}
978
979
	public function get_name() {
980
		return __( 'LinkedIn', 'jetpack' );
@@ 1220-1228 (lines=9) @@
1217
class Share_Print extends Sharing_Source {
1218
	public $shortname = 'print';
1219
	public $icon = '\f469';
1220
	public function __construct( $id, array $settings ) {
1221
		parent::__construct( $id, $settings );
1222
1223
		if ( 'official' == $this->button_style ) {
1224
			$this->smart = true;
1225
		} else {
1226
			$this->smart = false;
1227
		}
1228
	}
1229
1230
	public function get_name() {
1231
		return __( 'Print', 'jetpack' );
@@ 1255-1263 (lines=9) @@
1252
class Share_PressThis extends Sharing_Source {
1253
	public $shortname = 'pressthis';
1254
	public $icon = '\f205';
1255
	public function __construct( $id, array $settings ) {
1256
		parent::__construct( $id, $settings );
1257
1258
		if ( 'official' == $this->button_style ) {
1259
			$this->smart = true;
1260
		} else {
1261
			$this->smart = false;
1262
		}
1263
	}
1264
1265
	public function get_name() {
1266
		return __( 'Press This', 'jetpack' );
@@ 1536-1543 (lines=8) @@
1533
class Share_Tumblr extends Sharing_Source {
1534
	public $shortname = 'tumblr';
1535
	public $icon = '\f214';
1536
	public function __construct( $id, array $settings ) {
1537
		parent::__construct( $id, $settings );
1538
		if ( 'official' == $this->button_style ) {
1539
			$this->smart = true;
1540
		} else {
1541
			$this->smart = false;
1542
		}
1543
	}
1544
1545
	public function get_name() {
1546
		return __( 'Tumblr', 'jetpack' );
@@ 1606-1613 (lines=8) @@
1603
	public $shortname = 'pinterest';
1604
	public $icon = '\f209';
1605
1606
	public function __construct( $id, array $settings ) {
1607
		parent::__construct( $id, $settings );
1608
		if ( 'official' == $this->button_style ) {
1609
			$this->smart = true;
1610
		} else {
1611
			$this->smart = false;
1612
		}
1613
	}
1614
1615
	public function get_name() {
1616
		return __( 'Pinterest', 'jetpack' );
@@ 1789-1797 (lines=9) @@
1786
	public $shortname = 'pocket';
1787
	public $icon = '\f224';
1788
1789
	public function __construct( $id, array $settings ) {
1790
		parent::__construct( $id, $settings );
1791
1792
		if ( 'official' == $this->button_style ) {
1793
			$this->smart = true;
1794
		} else {
1795
			$this->smart = false;
1796
		}
1797
	}
1798
1799
	public function get_name() {
1800
		return __( 'Pocket', 'jetpack' );