Code Duplication    Length = 11-11 lines in 2 locations

src/includes/class-wordlift-post-adapter.php 2 locations

@@ 176-186 (lines=11) @@
173
	 *
174
	 * @since 3.27.2
175
	 */
176
	public function keywords() {
177
		$tags = get_the_tags( $this->post_id );
178
179
		if ( empty( $tags ) ) {
180
			return;
181
		}
182
183
		return implode( ',', array_map( function ( $tag ) {
184
			return $tag->name;
185
		}, $tags ) );
186
	}
187
188
	/**
189
	 * Get comma separated categories to be used as article section
@@ 195-205 (lines=11) @@
192
	 *
193
	 * @since 3.27.2
194
	 */
195
	public function article_section() {
196
		$categories = get_the_category( $this->post_id );
197
198
		if ( empty( $categories ) ) {
199
			return;
200
		}
201
202
		return implode( ',', array_map( function ( $tag ) {
203
			return $tag->cat_name;
204
		}, $categories ) );
205
	}
206
207
	/**
208
	 * Get comment count