Code Duplication    Length = 3-3 lines in 3 locations

includes/admin/notice.php 3 locations

@@ 116-118 (lines=3) @@
113
			// Content.
114
			$this->id = is_array( $notice['id'] ) ? array_map( 'sanitize_key', $notice['id'] ) : sanitize_key( $notice['id'] );
115
			$this->content = wp_kses_post( $notice['content'] );
116
			if ( ! empty( $notice['class'] ) ) {
117
				$this->class = is_array( $notice['class'] ) ? join( ' ', array_map( 'esc_attr', $notice['class'] ) ) : esc_attr( $notice['class'] );
118
			}
119
120
			// Type.
121
			$default = 'notice';
@@ 135-137 (lines=3) @@
132
			if ( ! empty( $notice['capability'] ) ) {
133
				$this->capability = esc_attr( $notice['capability'] );
134
			}
135
			if ( ! empty( $notice['screen'] ) ) {
136
				$this->screen = is_array( $notice['screen'] ) ? array_map( 'esc_attr', $notice['screens'] ) : array( esc_attr( $notice['screen'] ) );
137
			}
138
			if ( ! empty( $notice['post'] ) ) {
139
				$this->post = is_array( $notice['post'] ) ? array_map( 'intval', $notice['post'] ) : array( intval( $notice['post'] ) );
140
			}
@@ 138-140 (lines=3) @@
135
			if ( ! empty( $notice['screen'] ) ) {
136
				$this->screen = is_array( $notice['screen'] ) ? array_map( 'esc_attr', $notice['screens'] ) : array( esc_attr( $notice['screen'] ) );
137
			}
138
			if ( ! empty( $notice['post'] ) ) {
139
				$this->post = is_array( $notice['post'] ) ? array_map( 'intval', $notice['post'] ) : array( intval( $notice['post'] ) );
140
			}
141
			if ( ! empty( $notice['dismissible'] ) ) {
142
				$this->dismissible = $notice['dismissible'] === false ? false: true;
143
			}