Skip to content

Commit ef7cfe1

Browse files
committed
PHPCS: whitelist some code for select sniffs
1 parent 8ab7bd3 commit ef7cfe1

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/Core_Language_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function uninstall( $args, $assoc_args ) {
311311
*
312312
* @subcommand update
313313
*/
314-
public function update( $args, $assoc_args ) {
314+
public function update( $args, $assoc_args ) { // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found -- Overruling the documentation, so not useless ;-).
315315
parent::update( $args, $assoc_args );
316316
}
317317

src/Plugin_Language_Command.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ public function update( $args, $assoc_args ) {
466466
* @return array
467467
*/
468468
private function get_all_plugins() {
469+
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Using WP native hook.
469470
return apply_filters( 'all_plugins', get_plugins() );
470471
}
471472
}

src/WP_CLI/LanguagePackUpgrader.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ public function download_package( $package ) {
5757
* @param bool $reply Whether to bail without returning the package. Default is false.
5858
* @param string $package The package file name.
5959
* @param \WP_Upgrader $this The WP_Upgrader instance.
60+
*
61+
* @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Using WP native hook.
6062
*/
6163
$reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
64+
// phpcs:enable
65+
6266
if ( false !== $reply ) {
6367
return $reply;
6468
}

0 commit comments

Comments
 (0)