Code Duplication    Length = 6-8 lines in 2 locations

includes/librairies/eav/attributes_set.class.php 1 location

@@ 87-94 (lines=8) @@
84
		$objectInEdition = isset($_REQUEST['id']) ? sanitize_key($_REQUEST['id']) : '';
85
86
		$title = __(self::pageTitle, 'wpshop' );
87
		if($action != ''){
88
			if($action == 'edit'){
89
				$editedItem = self::getElement($objectInEdition);
90
				$title = sprintf(__(self::pageEditingTitle, 'wpshop'), __($editedItem->name, 'wpshop'), __($editedItem->entity, 'wpshop'));
91
			}
92
			elseif($action == 'add')
93
				$title = __(self::pageAddingTitle, 'wpshop');
94
		}
95
		return $title;
96
	}
97

includes/librairies/eav/attributes.class.php 1 location

@@ 92-97 (lines=6) @@
89
90
		$title = __(self::pageTitle, 'wpshop' );
91
		if($action != ''){
92
			if(($action == 'edit') || ($action == 'delete')){
93
				$editedItem = self::getElement($objectInEdition);
94
				$title = sprintf(__(self::pageEditingTitle, 'wpshop'), str_replace("\\", "", $editedItem->frontend_label));
95
			}
96
			elseif($action == 'add')
97
				$title = __(self::pageAddingTitle, 'wpshop');
98
		}
99
		elseif((self::getEditionSlug() != self::getListingSlug()) && ($page == self::getEditionSlug()))
100
			$title = __(self::pageAddingTitle, 'wpshop');