Code Duplication    Length = 23-23 lines in 2 locations

includes/widgets/class-wc-widget-recent-reviews.php 1 location

@@ 21-43 (lines=23) @@
18
	/**
19
	 * Constructor.
20
	 */
21
	public function __construct() {
22
		$this->widget_cssclass    = 'woocommerce widget_recent_reviews';
23
		$this->widget_description = __( 'Display a list of your most recent reviews on your site.', 'woocommerce' );
24
		$this->widget_id          = 'woocommerce_recent_reviews';
25
		$this->widget_name        = __( 'WooCommerce Recent Reviews', 'woocommerce' );
26
		$this->settings           = array(
27
			'title'  => array(
28
				'type'  => 'text',
29
				'std'   => __( 'Recent Reviews', 'woocommerce' ),
30
				'label' => __( 'Title', 'woocommerce' )
31
			),
32
			'number' => array(
33
				'type'  => 'number',
34
				'step'  => 1,
35
				'min'   => 1,
36
				'max'   => '',
37
				'std'   => 10,
38
				'label' => __( 'Number of reviews to show', 'woocommerce' )
39
			)
40
		);
41
42
		parent::__construct();
43
	}
44
45
	/**
46
	 * Output widget.

includes/widgets/class-wc-widget-top-rated-products.php 1 location

@@ 23-45 (lines=23) @@
20
	/**
21
	 * Constructor.
22
	 */
23
	public function __construct() {
24
		$this->widget_cssclass    = 'woocommerce widget_top_rated_products';
25
		$this->widget_description = __( 'Display a list of your top rated products on your site.', 'woocommerce' );
26
		$this->widget_id          = 'woocommerce_top_rated_products';
27
		$this->widget_name        = __( 'WooCommerce Top Rated Products', 'woocommerce' );
28
		$this->settings           = array(
29
			'title'  => array(
30
				'type'  => 'text',
31
				'std'   => __( 'Top Rated Products', 'woocommerce' ),
32
				'label' => __( 'Title', 'woocommerce' )
33
			),
34
			'number' => array(
35
				'type'  => 'number',
36
				'step'  => 1,
37
				'min'   => 1,
38
				'max'   => '',
39
				'std'   => 5,
40
				'label' => __( 'Number of products to show', 'woocommerce' )
41
			)
42
		);
43
44
		parent::__construct();
45
	}
46
47
	/**
48
	 * Output widget.