Skip to content

Commit 045fd68

Browse files
Manual PHPCS cleanup
1 parent 092dbe4 commit 045fd68

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.maintenance/src/Contrib_List_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function ( $a, $b ) {
198198

199199
// Sort and render the contributor list
200200
asort( $contributors, SORT_NATURAL | SORT_FLAG_CASE );
201-
if ( in_array( $assoc_args['format'], array( 'markdown', 'html' ) ) ) {
201+
if ( in_array( $assoc_args['format'], array( 'markdown', 'html' ), true ) ) {
202202
$contrib_list = '';
203203
foreach ( $contributors as $url => $login ) {
204204
if ( 'markdown' === $assoc_args['format'] ) {

.maintenance/src/Release_Notes_Command.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private function get_bundle_release_notes( $source, $format ) {
7979
$milestone = array_reduce(
8080
$milestones,
8181
static function ( $latest, $milestone ) {
82-
if ( $latest === null ) {
82+
if ( null === $latest ) {
8383
return $milestone;
8484
}
8585
return version_compare( $milestone->title, $latest->title, '<' ) ? $milestone : $latest;
@@ -256,6 +256,7 @@ private function get_repo_release_notes(
256256
}
257257

258258
WP_CLI::warning( "Release notes not found for {$repo}@{$tag}, falling back to pull-request source" );
259+
// Intentionally falling through.
259260
case 'pull-request':
260261
$pull_requests = GitHub::get_project_milestone_pull_requests(
261262
$repo,
@@ -274,7 +275,7 @@ private function get_repo_release_notes(
274275
}
275276
}
276277

277-
$template = $format === 'html' ? '<ul>%s</ul>' : '%s';
278+
$template = 'html' === $format ? '<ul>%s</ul>' : '%s';
278279

279280
WP_CLI::log( sprintf( $template, implode( '', $entries ) ) );
280281
}
@@ -283,7 +284,7 @@ private function get_pull_request_reference(
283284
$pull_request,
284285
$format
285286
) {
286-
$template = $format === 'html' ?
287+
$template = 'html' === $format ?
287288
'<li>%1$s [<a href="%3$s">#%2$d</a>]</li>' :
288289
'- %1$s [[#%2$d](%3$s)]' . PHP_EOL;
289290

0 commit comments

Comments
 (0)