Code Duplication    Length = 3-3 lines in 2 locations

src/components/points/admin/includes/ajax.php 1 location

@@ 192-194 (lines=3) @@
189
190
		$settings = false;
191
192
		if ( isset( $_POST[ 'hook-' . $id_base ] ) && is_array( $_POST[ 'hook-' . $id_base ] ) ) {
193
			$settings = wp_unslash( $_POST[ 'hook-' . $id_base ] ); // WPCS: sanitization OK.
194
		}
195
196
		$points_types_hooks = WordPoints_Points_Hooks::get_points_types_hooks();
197

src/components/points/admin/screens/hooks-no-js-load.php 1 location

@@ 86-88 (lines=3) @@
83
84
	} else {
85
86
		if ( isset( $_POST[ 'hook-' . $id_base ] ) && is_array( $_POST[ 'hook-' . $id_base ] ) ) {
87
			$new_instance = wp_unslash( reset( $_POST[ 'hook-' . $id_base ] ) ); // WPCS sanitization OK.
88
		}
89
90
		$number = $hook->get_number_by_id( $hook_id );
91
	}