WordPress/Sniffs/WP/CapitalPDangitSniff.php
protected function retrieve_misspellings( $match_stack ) {
		$mispelled = array();
		foreach ( $match_stack as $match ) {
			// Deal with multi-dimensional arrays when capturing offset.
			if ( \is_array( $match ) ) {
				$match = $match[0];
			}

			if ( 'WordPress' !== $match ) {
				$mispelled[] = $match;
			}
		}

		return $mispelled;
	}
protected function retrieve_misspellings( $match_stack ) {
		$mispelled = array();
		foreach ( $match_stack as $match ) {
			// Deal with multi-dimensional arrays when capturing offset.
			if ( \is_array( $match ) ) {
				$match = $match[0];
			}

			if ( 'WordPress' !== $match ) {
				$mispelled[] = $match;
			}
		}

		return $mispelled;
	}
Retrieve a list of misspellings based on an array of matched variations on the target word.

@param array $match_stack Array of matched variations of the target word.
@return array Array containing only the misspelled variants.