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

classes/backup/class-backup-engine.php 1 location

@@ 72-92 (lines=21) @@
69
70
	}
71
72
	private function errors_to_warnings( $context = null ) {
73
74
		$errors = empty( $context ) ? $this->get_errors() : array( $context => $this->get_errors( $context ) );
75
76
		if ( empty( $errors ) ) {
77
			return;
78
		}
79
80
		foreach ( $errors as $error_context => $context_errors ) {
81
			foreach ( $context_errors as $error ) {
82
				$this->warning( $error_context, $error );
83
			}
84
		}
85
86
		if ( $context ) {
87
			unset( $this->errors[ $context ] );
88
		} else {
89
			$this->errors = array();
90
		}
91
92
	}
93
94
	public function get_warnings( $context = null ) {
95

classes/class-backup.php 1 location

@@ 1407-1427 (lines=21) @@
1404
	 *
1405
	 * @param null $context
1406
	 */
1407
	private function errors_to_warnings( $context = null ) {
1408
1409
		$errors = empty( $context ) ? $this->get_errors() : array( $context => $this->get_errors( $context ) );
1410
1411
		if ( empty( $errors ) ) {
1412
			return;
1413
		}
1414
1415
		foreach ( $errors as $error_context => $context_errors ) {
1416
			foreach ( $context_errors as $error ) {
1417
				$this->warning( $error_context, $error );
1418
			}
1419
		}
1420
1421
		if ( $context ) {
1422
			unset( $this->errors[ $context ] );
1423
		} else {
1424
			$this->errors = array();
1425
		}
1426
1427
	}
1428
1429
	/**
1430
	 * Get the warnings