Skip to content

Commit b7a09a1

Browse files
committed
PHPCS: fix up the code base
Only minimal changes needed.
1 parent a31a462 commit b7a09a1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Cache_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function decr( $args, $assoc_args ) {
129129
*/
130130
public function delete( $args, $assoc_args ) {
131131
list( $key, $group ) = $args;
132-
$result = wp_cache_delete( $key, $group );
132+
$result = wp_cache_delete( $key, $group );
133133

134134
if ( false === $result ) {
135135
WP_CLI::error( 'The object was not deleted.' );
@@ -188,7 +188,7 @@ public function flush( $args, $assoc_args ) {
188188
*/
189189
public function get( $args, $assoc_args ) {
190190
list( $key, $group ) = $args;
191-
$value = wp_cache_get( $key, $group );
191+
$value = wp_cache_get( $key, $group );
192192

193193
if ( false === $value ) {
194194
WP_CLI::error( "Object with key '$key' and group '$group' not found." );

src/Transient_Command.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function set( $args, $assoc_args ) {
177177
* $ wp transient delete --all --network && wp site list --field=url | xargs -n1 -I % wp --url=% transient delete --all
178178
*/
179179
public function delete( $args, $assoc_args ) {
180-
$key = ( ! empty( $args ) ) ? $args[0] : NULL;
180+
$key = ( ! empty( $args ) ) ? $args[0] : null;
181181

182182
$all = Utils\get_flag_value( $assoc_args, 'all' );
183183
$expired = Utils\get_flag_value( $assoc_args, 'expired' );
@@ -201,10 +201,11 @@ public function delete( $args, $assoc_args ) {
201201
WP_CLI::success( 'Transient deleted.' );
202202
} else {
203203
$func = Utils\get_flag_value( $assoc_args, 'network' ) ? 'get_site_transient' : 'get_transient';
204-
if ( $func( $key ) )
204+
if ( $func( $key ) ) {
205205
WP_CLI::error( 'Transient was not deleted even though the transient appears to exist.' );
206-
else
206+
} else {
207207
WP_CLI::warning( 'Transient was not deleted; however, the transient does not appear to exist.' );
208+
}
208209
}
209210
}
210211

0 commit comments

Comments
 (0)