Changelogger: Fix PHPCS violations (#33664)
This commit is contained in:
parent
0cebdf5277
commit
7229b65bc9
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"extra": {
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../../tools/changelogger/PackageFormatter.php"
|
||||
"filename": "../../../tools/changelogger/class-package-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
},
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../tools/changelogger/PluginFormatter.php"
|
||||
"filename": "../../tools/changelogger/class-plugin-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: PHPCS violation fixes
|
||||
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
},
|
||||
"changelogger": {
|
||||
"formatter": {
|
||||
"filename": "../../tools/changelogger/LegacyCoreFormatter.php"
|
||||
"filename": "../../tools/changelogger/class-legacy-core-formatter.php"
|
||||
},
|
||||
"types": {
|
||||
"fix": "Fixes an existing bug",
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<?php
|
||||
/**
|
||||
* Formatter class
|
||||
*
|
||||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\MonorepoTools\Changelogger;
|
||||
|
||||
|
@ -203,7 +208,7 @@ class Formatter extends KeepAChangelogParser {
|
|||
array(
|
||||
'subheading' => $is_subentry ? '' : trim( $row_segments[0] ),
|
||||
'content' => $is_subentry ? trim( $row ) : trim( isset( $row_segments[1] ) ? $row_segments[1] : '' ),
|
||||
'significance' => in_array( $significance, array( 'patch', 'minor', 'major' ) ) ? $significance : null,
|
||||
'significance' => in_array( $significance, array( 'patch', 'minor', 'major' ), true ) ? $significance : null,
|
||||
)
|
||||
);
|
||||
}
|
|
@ -1,4 +1,9 @@
|
|||
<?php
|
||||
/**
|
||||
* Legacy_Core_Formatter class
|
||||
*
|
||||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\MonorepoTools\Changelogger;
|
||||
|
||||
|
@ -9,14 +14,14 @@ use Automattic\Jetpack\Changelogger\FormatterPlugin;
|
|||
* Jetpack Changelogger Formatter for WooCommerce plugins
|
||||
*/
|
||||
|
||||
require_once 'Formatter.php';
|
||||
require_once 'class-formatter.php';
|
||||
|
||||
/**
|
||||
* Jetpack Changelogger Formatter for Legacy Core Changelog
|
||||
*
|
||||
* Class Formatter
|
||||
*/
|
||||
class LegacyCoreFormatter extends Formatter implements FormatterPlugin {
|
||||
class Legacy_Core_Formatter extends Formatter implements FormatterPlugin {
|
||||
|
||||
/**
|
||||
* Bullet for changes.
|
||||
|
@ -41,6 +46,7 @@ class LegacyCoreFormatter extends Formatter implements FormatterPlugin {
|
|||
private function getSubheadingTypeMapping() {
|
||||
$woocommerce_path = dirname( dirname( __DIR__ ) ) . '/plugins/woocommerce';
|
||||
$composer_file = $woocommerce_path . '/composer.json';
|
||||
// phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
|
||||
$composer_config = json_decode( file_get_contents( $composer_file ), true );
|
||||
return array_flip( $composer_config['extra']['changelogger']['types'] );
|
||||
}
|
||||
|
@ -59,7 +65,7 @@ class LegacyCoreFormatter extends Formatter implements FormatterPlugin {
|
|||
|
||||
foreach ( $changelog->getEntries() as $entry ) {
|
||||
$version = $entry->getVersion();
|
||||
if ( substr_count( $version, '.' ) == 1 ) {
|
||||
if ( substr_count( $version, '.' ) === 1 ) {
|
||||
$version .= '.0';
|
||||
}
|
||||
|
|
@ -1,4 +1,9 @@
|
|||
<?php
|
||||
/**
|
||||
* Package_Formatter class
|
||||
*
|
||||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\MonorepoTools\Changelogger;
|
||||
|
||||
|
@ -8,14 +13,14 @@ use Automattic\Jetpack\Changelogger\FormatterPlugin;
|
|||
* Jetpack Changelogger Formatter for WooCommerce packages
|
||||
*/
|
||||
|
||||
require_once 'Formatter.php';
|
||||
require_once 'class-formatter.php';
|
||||
|
||||
/**
|
||||
* Jetpack Changelogger Formatter for WooCommerce Packages
|
||||
*
|
||||
* Class Formatter
|
||||
*/
|
||||
class PackageFormatter extends Formatter implements FormatterPlugin {
|
||||
class Package_Formatter extends Formatter implements FormatterPlugin {
|
||||
/**
|
||||
* Prologue text.
|
||||
*
|
|
@ -1,4 +1,9 @@
|
|||
<?php
|
||||
/**
|
||||
* Plugin_Formatter class
|
||||
*
|
||||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\MonorepoTools\Changelogger;
|
||||
|
||||
|
@ -8,14 +13,14 @@ use Automattic\Jetpack\Changelogger\FormatterPlugin;
|
|||
* Jetpack Changelogger Formatter for WooCommerce plugins
|
||||
*/
|
||||
|
||||
require_once 'Formatter.php';
|
||||
require_once 'class-formatter.php';
|
||||
|
||||
/**
|
||||
* Jetpack Changelogger Formatter for WooCommerce Plugins
|
||||
*
|
||||
* Class Formatter
|
||||
*/
|
||||
class PluginFormatter extends Formatter implements FormatterPlugin {
|
||||
class Plugin_Formatter extends Formatter implements FormatterPlugin {
|
||||
/**
|
||||
* Epilogue text.
|
||||
*
|
Loading…
Reference in New Issue