Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to WordPressCS 3.0.0 #5047

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/wp-includes/blocks/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ function render_block_core_calendar( $attributes ) {
str_contains( $permalink_structure, '%monthnum%' ) &&
str_contains( $permalink_structure, '%year%' )
) {
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $attributes['month'];
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$year = $attributes['year'];
$year = $attributes['year'];
}
}

Expand Down Expand Up @@ -70,10 +68,8 @@ function render_block_core_calendar( $attributes ) {
$calendar
);

// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$monthnum = $previous_monthnum;
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$year = $previous_year;
$year = $previous_year;

return $output;
}
Expand Down
16 changes: 8 additions & 8 deletions src/wp-includes/class-wp-block-parser-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WP_Block_Parser_Block {
* @since 5.0.0
* @var string
*/
public $blockName; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
public $blockName;

/**
* Optional set of attributes from block comment delimiters
Expand All @@ -40,7 +40,7 @@ class WP_Block_Parser_Block {
* @since 5.0.0
* @var WP_Block_Parser_Block[]
*/
public $innerBlocks; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
public $innerBlocks;

/**
* Resultant HTML from inside block comment delimiters
Expand All @@ -51,7 +51,7 @@ class WP_Block_Parser_Block {
* @since 5.0.0
* @var string
*/
public $innerHTML; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
public $innerHTML;

/**
* List of string fragments and null markers where inner blocks were found
Expand All @@ -65,7 +65,7 @@ class WP_Block_Parser_Block {
* @since 4.2.0
* @var array
*/
public $innerContent; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
public $innerContent;

/**
* Constructor.
Expand All @@ -81,10 +81,10 @@ class WP_Block_Parser_Block {
* @param array $inner_content List of string fragments and null markers where inner blocks were found.
*/
public function __construct( $name, $attrs, $inner_blocks, $inner_html, $inner_content ) {
$this->blockName = $name; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->blockName = $name;
$this->attrs = $attrs;
$this->innerBlocks = $inner_blocks; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->innerHTML = $inner_html; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->innerContent = $inner_content; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->innerBlocks = $inner_blocks;
$this->innerHTML = $inner_html;
$this->innerContent = $inner_content;
}
}
Loading