Code Duplication    Length = 8-8 lines in 2 locations

packages/autoloader/src/class-hook-manager.php 2 locations

@@ 31-38 (lines=8) @@
28
	 * @param int      $priority      Used to specify the priority of the action.
29
	 * @param int      $accepted_args Used to specify the number of arguments the callable accepts.
30
	 */
31
	public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
32
		$this->registered_hooks[ $tag ][] = array(
33
			'priority' => $priority,
34
			'callable' => $callable,
35
		);
36
37
		add_action( $tag, $callable, $priority, $accepted_args );
38
	}
39
40
	/**
41
	 * Adds a filter to WordPress and registers it internally.
@@ 48-55 (lines=8) @@
45
	 * @param int      $priority      Used to specify the priority of the filter.
46
	 * @param int      $accepted_args Used to specify the number of arguments the callable accepts.
47
	 */
48
	public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
49
		$this->registered_hooks[ $tag ][] = array(
50
			'priority' => $priority,
51
			'callable' => $callable,
52
		);
53
54
		add_filter( $tag, $callable, $priority, $accepted_args );
55
	}
56
57
	/**
58
	 * Removes all of the registered hooks.