Make WordPress Core

Changeset 56753


Ignore:
Timestamp:
10/02/2023 11:25:35 AM (7 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove redundant ignore annotations, take 5.

The VariableAnalysis standard is not used by WP Core.

Follow-up to [50958], [51003], [52049], [52051], [52069], [53072], [54132], [55132], [56363], [56738], [56743], [56751], [56752].

Props jrf.
See #59161.

Location:
trunk/src/wp-includes
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/dimensions.php

    r56709 r56753  
    5151 * @return array Block dimensions CSS classes and inline styles.
    5252 */
    53 function wp_apply_dimensions_support( $block_type, $block_attributes ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     53function wp_apply_dimensions_support( $block_type, $block_attributes ) {
    5454    if ( wp_should_skip_block_supports_serialization( $block_type, 'dimensions' ) ) {
    5555        return array();
  • trunk/src/wp-includes/blocks.php

    r56744 r56753  
    550550             * @return string Returns the block content.
    551551             */
    552             $settings['render_callback'] = static function ( $attributes, $content, $block ) use ( $template_path ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     552            $settings['render_callback'] = static function ( $attributes, $content, $block ) use ( $template_path ) {
    553553                ob_start();
    554554                require $template_path;
  • trunk/src/wp-includes/class-wp-theme-json-schema.php

    r55725 r56753  
    141141     */
    142142    private static function unset_setting_by_path( &$settings, $path ) {
    143         $tmp_settings = &$settings; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     143        $tmp_settings = &$settings;
    144144        $last_key     = array_pop( $path );
    145145        foreach ( $path as $key ) {
  • trunk/src/wp-includes/functions.php

    r56748 r56753  
    50805080            $input_array[ $path_element ] = array();
    50815081        }
    5082         $input_array = &$input_array[ $path_element ]; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.VariableRedeclaration
     5082        $input_array = &$input_array[ $path_element ];
    50835083    }
    50845084
  • trunk/src/wp-includes/html-api/class-wp-html-open-elements.php

    r56380 r56753  
    111111     * @return bool Whether the element was found in a specific scope.
    112112     */
    113     public function has_element_in_specific_scope( $tag_name, $termination_list ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     113    public function has_element_in_specific_scope( $tag_name, $termination_list ) {
    114114        foreach ( $this->walk_up() as $node ) {
    115115            if ( $node->node_name === $tag_name ) {
     
    168168     * @return bool Whether given element is in scope.
    169169     */
    170     public function has_element_in_list_item_scope( $tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     170    public function has_element_in_list_item_scope( $tag_name ) {
    171171        throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on list item scope.' );
    172172
     
    200200     * @return bool Whether given element is in scope.
    201201     */
    202     public function has_element_in_table_scope( $tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     202    public function has_element_in_table_scope( $tag_name ) {
    203203        throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on table scope.' );
    204204
     
    218218     * @return bool Whether given element is in scope.
    219219     */
    220     public function has_element_in_select_scope( $tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     220    public function has_element_in_select_scope( $tag_name ) {
    221221        throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on select scope.' );
    222222
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

    r56586 r56753  
    359359     * @return WP_REST_Response Response object.
    360360     */
    361     public function prepare_item_for_response( $post, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     361    public function prepare_item_for_response( $post, $request ) {
    362362        $raw_config                       = json_decode( $post->post_content, true );
    363363        $is_global_styles_user_theme_json = isset( $raw_config['isGlobalStylesUserThemeJSON'] ) && true === $raw_config['isGlobalStylesUserThemeJSON'];
     
    642642     * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    643643     */
    644     public function get_theme_items_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     644    public function get_theme_items_permissions_check( $request ) {
    645645        /*
    646646         * Verify if the current user has edit_theme_options capability.
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php

    r56586 r56753  
    107107
    108108        $query_args['locale']             = get_user_locale();
    109         $query_args['wp-version']         = $wp_version; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- it's defined in `version.php` above.
     109        $query_args['wp-version']         = $wp_version;
    110110        $query_args['pattern-categories'] = isset( $request['category'] ) ? $request['category'] : false;
    111111        $query_args['pattern-keywords']   = isset( $request['keyword'] ) ? $request['keyword'] : false;
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php

    r56248 r56753  
    634634     * @return WP_REST_Response Response object.
    635635     */
    636     public function prepare_item_for_response( $item, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
     636    public function prepare_item_for_response( $item, $request ) {
    637637        // Restores the more descriptive, specific name for use within this method.
    638638        $template = $item;
Note: See TracChangeset for help on using the changeset viewer.