Code Duplication    Length = 7-8 lines in 10 locations

modules/sharedaddy/sharing-sources.php 10 locations

@@ 374-381 (lines=8) @@
371
class Share_Email extends Sharing_Source {
372
	public $shortname = 'email';
373
	public $genericon = '\f410';
374
	public function __construct( $id, array $settings ) {
375
		parent::__construct( $id, $settings );
376
377
		if ( 'official' == $this->button_style ) {
378
			$this->smart = true;
379
		} else {
380
			$this->smart = false;
381
		}
382
	}
383
384
	public function get_name() {
@@ 561-568 (lines=8) @@
558
	// 'https://dev.twitter.com/rest/reference/get/help/configuration' ( 2015/02/06 ) short_url_length is 22, short_url_length_https is 23
559
	public $short_url_length = 24;
560
561
	public function __construct( $id, array $settings ) {
562
		parent::__construct( $id, $settings );
563
564
		if ( 'official' == $this->button_style ) {
565
			$this->smart = true;
566
		} else {
567
			$this->smart = false;
568
		}
569
	}
570
571
	public function get_name() {
@@ 770-777 (lines=8) @@
767
class Share_Reddit extends Sharing_Source {
768
	public $shortname = 'reddit';
769
	public $genericon = '\f222';
770
	public function __construct( $id, array $settings ) {
771
		parent::__construct( $id, $settings );
772
773
		if ( 'official' == $this->button_style ) {
774
			$this->smart = true;
775
		} else {
776
			$this->smart = false;
777
		}
778
	}
779
780
	public function get_name() {
@@ 807-814 (lines=8) @@
804
class Share_LinkedIn extends Sharing_Source {
805
	public $shortname = 'linkedin';
806
	public $genericon = '\f207';
807
	public function __construct( $id, array $settings ) {
808
		parent::__construct( $id, $settings );
809
810
		if ( 'official' == $this->button_style ) {
811
			$this->smart = true;
812
		} else {
813
			$this->smart = false;
814
		}
815
	}
816
817
	public function get_name() {
@@ 1018-1025 (lines=8) @@
1015
class Share_Print extends Sharing_Source {
1016
	public $shortname = 'print';
1017
	public $genericon = '\f469';
1018
	public function __construct( $id, array $settings ) {
1019
		parent::__construct( $id, $settings );
1020
1021
		if ( 'official' == $this->button_style ) {
1022
			$this->smart = true;
1023
		} else {
1024
			$this->smart = false;
1025
		}
1026
	}
1027
1028
	public function get_name() {
@@ 1040-1047 (lines=8) @@
1037
class Share_PressThis extends Sharing_Source {
1038
	public $shortname = 'pressthis';
1039
	public $genericon = '\f205';
1040
	public function __construct( $id, array $settings ) {
1041
		parent::__construct( $id, $settings );
1042
1043
		if ( 'official' == $this->button_style ) {
1044
			$this->smart = true;
1045
		} else {
1046
			$this->smart = false;
1047
		}
1048
	}
1049
1050
	public function get_name() {
@@ 1118-1125 (lines=8) @@
1115
	public $genericon = '\f218';
1116
	private $state = false;
1117
1118
	public function __construct( $id, array $settings ) {
1119
		parent::__construct( $id, $settings );
1120
1121
		if ( 'official' == $this->button_style ) {
1122
			$this->smart = true;
1123
		} else {
1124
			$this->smart = false;
1125
		}
1126
	}
1127
1128
	public function get_name() {
@@ 1417-1423 (lines=7) @@
1414
class Share_Tumblr extends Sharing_Source {
1415
	public $shortname = 'tumblr';
1416
	public $genericon = '\f214';
1417
	public function __construct( $id, array $settings ) {
1418
		parent::__construct( $id, $settings );
1419
		if ( 'official' == $this->button_style ) {
1420
			$this->smart = true;
1421
		} else {
1422
			$this->smart = false;
1423
		}
1424
	}
1425
1426
	public function get_name() {
@@ 1466-1472 (lines=7) @@
1463
	public $shortname = 'pinterest';
1464
	public $genericon = '\f209';
1465
1466
	public function __construct( $id, array $settings ) {
1467
		parent::__construct( $id, $settings );
1468
		if ( 'official' == $this->button_style ) {
1469
			$this->smart = true;
1470
		} else {
1471
			$this->smart = false;
1472
		}
1473
	}
1474
1475
	public function get_name() {
@@ 1618-1625 (lines=8) @@
1615
	public $shortname = 'pocket';
1616
	public $genericon = '\f224';
1617
1618
	public function __construct( $id, array $settings ) {
1619
		parent::__construct( $id, $settings );
1620
1621
		if ( 'official' == $this->button_style ) {
1622
			$this->smart = true;
1623
		} else {
1624
			$this->smart = false;
1625
		}
1626
	}
1627
1628
	public function get_name() {