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() {
@@ 756-763 (lines=8) @@
753
class Share_Reddit extends Sharing_Source {
754
	public $shortname = 'reddit';
755
	public $genericon = '\f222';
756
	public function __construct( $id, array $settings ) {
757
		parent::__construct( $id, $settings );
758
759
		if ( 'official' == $this->button_style ) {
760
			$this->smart = true;
761
		} else {
762
			$this->smart = false;
763
		}
764
	}
765
766
	public function get_name() {
@@ 793-800 (lines=8) @@
790
class Share_LinkedIn extends Sharing_Source {
791
	public $shortname = 'linkedin';
792
	public $genericon = '\f207';
793
	public function __construct( $id, array $settings ) {
794
		parent::__construct( $id, $settings );
795
796
		if ( 'official' == $this->button_style ) {
797
			$this->smart = true;
798
		} else {
799
			$this->smart = false;
800
		}
801
	}
802
803
	public function get_name() {
@@ 1004-1011 (lines=8) @@
1001
class Share_Print extends Sharing_Source {
1002
	public $shortname = 'print';
1003
	public $genericon = '\f469';
1004
	public function __construct( $id, array $settings ) {
1005
		parent::__construct( $id, $settings );
1006
1007
		if ( 'official' == $this->button_style ) {
1008
			$this->smart = true;
1009
		} else {
1010
			$this->smart = false;
1011
		}
1012
	}
1013
1014
	public function get_name() {
@@ 1026-1033 (lines=8) @@
1023
class Share_PressThis extends Sharing_Source {
1024
	public $shortname = 'pressthis';
1025
	public $genericon = '\f205';
1026
	public function __construct( $id, array $settings ) {
1027
		parent::__construct( $id, $settings );
1028
1029
		if ( 'official' == $this->button_style ) {
1030
			$this->smart = true;
1031
		} else {
1032
			$this->smart = false;
1033
		}
1034
	}
1035
1036
	public function get_name() {
@@ 1104-1111 (lines=8) @@
1101
	public $genericon = '\f218';
1102
	private $state = false;
1103
1104
	public function __construct( $id, array $settings ) {
1105
		parent::__construct( $id, $settings );
1106
1107
		if ( 'official' == $this->button_style ) {
1108
			$this->smart = true;
1109
		} else {
1110
			$this->smart = false;
1111
		}
1112
	}
1113
1114
	public function get_name() {
@@ 1403-1409 (lines=7) @@
1400
class Share_Tumblr extends Sharing_Source {
1401
	public $shortname = 'tumblr';
1402
	public $genericon = '\f214';
1403
	public function __construct( $id, array $settings ) {
1404
		parent::__construct( $id, $settings );
1405
		if ( 'official' == $this->button_style ) {
1406
			$this->smart = true;
1407
		} else {
1408
			$this->smart = false;
1409
		}
1410
	}
1411
1412
	public function get_name() {
@@ 1452-1458 (lines=7) @@
1449
	public $shortname = 'pinterest';
1450
	public $genericon = '\f209';
1451
1452
	public function __construct( $id, array $settings ) {
1453
		parent::__construct( $id, $settings );
1454
		if ( 'official' == $this->button_style ) {
1455
			$this->smart = true;
1456
		} else {
1457
			$this->smart = false;
1458
		}
1459
	}
1460
1461
	public function get_name() {
@@ 1604-1611 (lines=8) @@
1601
	public $shortname = 'pocket';
1602
	public $genericon = '\f224';
1603
1604
	public function __construct( $id, array $settings ) {
1605
		parent::__construct( $id, $settings );
1606
1607
		if ( 'official' == $this->button_style ) {
1608
			$this->smart = true;
1609
		} else {
1610
			$this->smart = false;
1611
		}
1612
	}
1613
1614
	public function get_name() {