Skip to content

Commit a75e96c

Browse files
Coding Standards: Remove a few unnecessary PHPCS annotations.
Follow-up to [57337], [57548], [60295], [61120]. Props rodrigosprimo. See #64627. git-svn-id: https://develop.svn.wordpress.org/trunk@61668 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2e8938e commit a75e96c

4 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/wp-includes/l10n/class-wp-translation-file-mo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function detect_endian_and_validate_file( string $header ) {
9090
protected function parse_file(): bool {
9191
$this->parsed = true;
9292

93-
$file_contents = file_get_contents( $this->file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
93+
$file_contents = file_get_contents( $this->file );
9494

9595
if ( false === $file_contents ) {
9696
return false;

src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public function get_collection_params() {
337337
*
338338
* @return true|WP_Error True if the request has write access for the item, WP_Error object otherwise.
339339
*/
340-
public function get_items_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
340+
public function get_items_permissions_check( $request ) {
341341
if ( current_user_can( 'edit_theme_options' ) ) {
342342
return true;
343343
}

tests/phpunit/includes/build-visual-html-tree.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
/* phpcs:disable WordPress.Security.EscapeOutput.ExceptionNotEscaped */
4-
53
/**
64
* Generates representation of the semantic HTML tree structure.
75
*
@@ -278,7 +276,6 @@ static function ( $a, $b ) {
278276
}
279277
break;
280278
default:
281-
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
282279
$serialized_token_type = var_export( $processor->get_token_type(), true );
283280
throw new Exception( "Unhandled token type for tree construction: {$serialized_token_type}" );
284281
}

tests/phpunit/tests/template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ public function test_wp_finalize_template_enhancement_output_buffer_with_errors_
12641264
// Start a wrapper output buffer so that we can flush the inner buffer.
12651265
ob_start();
12661266

1267-
ini_set( 'error_log', $this->temp_filename() ); // phpcs:ignore WordPress.PHP.IniSet.log_errors_Blacklisted, WordPress.PHP.IniSet.Risky
1267+
ini_set( 'error_log', $this->temp_filename() );
12681268
foreach ( $ini_config_options as $config => $option ) {
12691269
ini_set( $config, $option );
12701270
}

0 commit comments

Comments
 (0)