Code Duplication    Length = 12-13 lines in 2 locations

src/PostType/Archive.php 1 location

@@ 42-54 (lines=13) @@
39
	 * @return void
40
	 * @action admin_menu
41
	 */
42
	public function addPage()
43
	{
44
		// post => edit.php
45
		// page|cpt => edit.php?post_type=%s
46
		$this->hook = call_user_func_array( 'add_submenu_page', $this->filter( 'page', [
47
			'edit.php',
48
			sprintf( __( '%s Archive', 'pollux' ), 'Post' ),
49
			__( 'Archive', 'pollux' ),
50
			'edit_theme_options',
51
			static::id(),
52
			[$this, 'renderPage'],
53
		]));
54
	}
55
56
	/**
57
	 * @param string $instruction

src/Settings/Settings.php 1 location

@@ 73-84 (lines=12) @@
70
	 * @return void
71
	 * @action admin_menu
72
	 */
73
	public function addPage()
74
	{
75
		$this->hook = call_user_func_array( 'add_menu_page', $this->filter( 'page', [
76
			__( 'Site Settings', 'pollux' ),
77
			__( 'Site Settings', 'pollux' ),
78
			'edit_theme_options',
79
			static::id(),
80
			[$this, 'renderPage'],
81
			'dashicons-screenoptions',
82
			1313
83
		]));
84
	}
85
86
	/**
87
	 * @return void