Code Duplication    Length = 6-6 lines in 2 locations

functions.cookies.php 2 locations

@@ 47-52 (lines=6) @@
44
		$cookie .= 'HttpOnly; ';
45
	}
46
47
	if ( ! empty( $options['domain'] ) && is_string( $options['domain'] ) ) {
48
		if ( strpbrk( $options['domain'], false !== $not_allowed_chars ) ) {
49
			return false;
50
		}
51
		$cookie .= sprintf( 'domain=%s', $options['domain'] . '; ' );
52
	}
53
54
	if ( ! empty( $options['path'] ) && is_string( $options['path'] ) ) {
55
		if ( strpbrk( $options['path'], false !== $not_allowed_chars ) ) {
@@ 54-59 (lines=6) @@
51
		$cookie .= sprintf( 'domain=%s', $options['domain'] . '; ' );
52
	}
53
54
	if ( ! empty( $options['path'] ) && is_string( $options['path'] ) ) {
55
		if ( strpbrk( $options['path'], false !== $not_allowed_chars ) ) {
56
			return false;
57
		}
58
		$cookie .= sprintf( 'path=%s', $options['path'] . '; ' );
59
	}
60
61
	if ( ! empty( $options['samesite'] ) && is_string( $options['samesite'] ) ) {
62
		$cookie .= sprintf( 'SameSite=%s', $options['samesite'] . '; ' );