Code Duplication    Length = 3-5 lines in 2 locations

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

@@ 130-132 (lines=3) @@
127
			$settings['name'] = trim( sanitize_text_field( wp_unslash( $_POST['points-name'] ) ) );
128
		}
129
130
		if ( isset( $_POST['points-prefix'] ) ) {
131
			$settings['prefix'] = ltrim( sanitize_text_field( wp_unslash( $_POST['points-prefix'] ) ) );
132
		}
133
134
		if ( isset( $_POST['points-suffix'] ) ) {
135
			$settings['suffix'] = rtrim( sanitize_text_field( wp_unslash( $_POST['points-suffix'] ) ) );

src/components/points/admin/classes/screen/points/types.php 1 location

@@ 690-694 (lines=5) @@
687
			);
688
		}
689
690
		if ( isset( $_POST['points-prefix'] ) ) { // WPCS: CSRF OK
691
			$settings['prefix'] = ltrim(
692
				sanitize_text_field( wp_unslash( $_POST['points-prefix'] ) ) // WPCS: CSRF OK
693
			);
694
		}
695
696
		if ( isset( $_POST['points-suffix'] ) ) { // WPCS: CSRF OK
697
			$settings['suffix'] = rtrim(