GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 18-19 lines in 3 locations

inc/display/namespace.php 3 locations

@@ 304-322 (lines=19) @@
301
 * @return mixed        The HTML markup for difficulty or false if not set.
302
 * @uses                Game\get_difficulties
303
 */
304
function get_difficulty( $game_id ) {
305
	if ( $difficulty = get_post_meta( $game_id, '_gc_difficulty', true ) ) {
306
		ob_start(); ?>
307
		<span class="gc-icon icon-game-difficulty"><?php the_svg( 'difficulty', false ); ?></span><span class="game-difficulty" id="game-<?php echo absint( $game_id ); ?>-difficulty"><?php echo esc_html( Game\get_difficulties( $difficulty ) ); ?></span>
308
309
		<?php $output = ob_get_clean();
310
311
		/**
312
		 * Allow the difficulty output to be filtered (but only if it has been set).
313
		 *
314
		 * @since 1.0.0
315
		 * @var   string The HTML markup for difficulty.
316
		 * @uses         Game\get_difficulties
317
		 */
318
		return apply_filters( 'gc_filter_difficulty', $output );
319
	}
320
321
	return false;
322
}
323
324
/**
325
 * Return the game playing time.
@@ 331-348 (lines=18) @@
328
 * @param  int $game_id The game's post ID.
329
 * @return mixed        The HTML markup for playing time or false if not set.
330
 */
331
function get_playing_time( $game_id ) {
332
	if ( $playing_time = get_post_meta( $game_id, '_gc_time', true ) ) {
333
		ob_start(); ?>
334
		<span class="gc-icon icon-game-time"><?php the_svg( 'time', false ); ?></span><span class="game-playing-time" id="game-<?php echo absint( $game_id ); ?>-playing-time"><?php echo esc_html( sprintf( __( '%s minutes', 'games-collector' ), $playing_time ) ); ?></span>
335
336
		<?php $output = ob_get_clean();
337
338
		/**
339
		 * Allow the playing time output to be filtered (but only if it has been set).
340
		 *
341
		 * @since 1.0.0
342
		 * @var   string The HTML markup for playing time.
343
		 */
344
		return apply_filters( 'gc_filter_playing_time', $output );
345
	}
346
347
	return false;
348
}
349
350
/**
351
 * Return the game age.
@@ 357-374 (lines=18) @@
354
 * @param  int $game_id The game's post ID.
355
 * @return mixed        The HTML markup for age or false if not set.
356
 */
357
function get_age( $game_id ) {
358
	if ( $age = get_post_meta( $game_id, '_gc_age', true ) ) {
359
		ob_start(); ?>
360
		<span class="gc-icon icon-game-age"><?php the_svg( 'age', false ); ?></span><span class="game-age" id="game-<?php echo absint( $game_id ); ?>-age"><?php echo esc_html( sprintf( '%d+', $age ) ); ?></span>
361
362
		<?php $output = ob_get_clean();
363
364
		/**
365
		 * Allow the age output to be filtered (but only if it has been set).
366
		 *
367
		 * @since 1.0.0
368
		 * @var   string The HTML markup for age.
369
		 */
370
		return apply_filters( 'gc_filter_age', $output );
371
	}
372
373
	return false;
374
}
375
376
/**
377
 * Enqueue front end styles and scripts.