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 = 13-13 lines in 2 locations

classes/class-backup.php 2 locations

@@ 338-350 (lines=13) @@
335
	 *
336
	 * @return \WP_Error|null
337
	 */
338
	public function set_archive_filename( $filename ) {
339
340
		if ( empty( $filename ) || ! is_string( $filename ) ) {
341
			return new \WP_Error( 'invalid_file_name', __( 'archive filename must be a non-empty string', 'backupwordpress' ) );
342
		}
343
344
		if ( pathinfo( $filename, PATHINFO_EXTENSION ) !== 'zip' ) {
345
			return new \WP_Error( 'invalid_file_extension', sprintf( __( 'invalid file extension for archive filename <code>%s</code>', 'backupwordpress' ), $filename ) );
346
		}
347
348
		$this->archive_filename = strtolower( sanitize_file_name( remove_accents( $filename ) ) );
349
350
	}
351
352
	/**
353
	 * Get the full filepath to the database dump file.
@@ 383-395 (lines=13) @@
380
	 *
381
	 * @return \WP_Error|null
382
	 */
383
	public function set_database_dump_filename( $filename ) {
384
385
		if ( empty( $filename ) || ! is_string( $filename ) ) {
386
			return new \WP_Error( 'invalid_file_name', __( 'database dump filename must be a non-empty string', 'backupwordpress' ) );
387
		}
388
389
		if ( pathinfo( $filename, PATHINFO_EXTENSION ) !== 'sql' ) {
390
			return new \WP_Error( 'invalid_file_extension', sprintf( __( 'invalid file extension for database dump filename <code>%s</code>', 'backupwordpress' ), $filename ) );
391
		}
392
393
		$this->database_dump_filename = strtolower( sanitize_file_name( remove_accents( $filename ) ) );
394
395
	}
396
397
	/**
398
	 * Get the root directory to backup from