Skip to content

Commit cfbcaf8

Browse files
author
Guido W. Pettinari
committed
🐛 Quick fix void return
1 parent ad1ace5 commit cfbcaf8

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

src/Command.php

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,18 @@ abstract class Command
6969
*
7070
* @param array<mixed> $args
7171
* @param array<string,mixed> $assoc_args
72+
* @return void
7273
*/
73-
abstract protected static function invoke( array $args, array $assoc_args ): void;
74+
abstract protected static function invoke( array $args, array $assoc_args );
7475

7576
/**
7677
* Actual handler of the command
7778
*
7879
* @param array<mixed> $args
7980
* @param array<string,mixed> $assoc_args
81+
* @return void
8082
*/
81-
public function __invoke( array $args, array $assoc_args ): void
83+
public function __invoke( array $args, array $assoc_args )
8284
{
8385
if ( ! is_multisite() ) {
8486
static::invoke( $args, $assoc_args );
@@ -92,8 +94,9 @@ public function __invoke( array $args, array $assoc_args ): void
9294
*
9395
* @param array<mixed> $args
9496
* @param array<string,mixed> $assoc_args
97+
* @return void
9598
*/
96-
public static function invoke_multisite( array $args, array $assoc_args ): void
99+
public static function invoke_multisite( array $args, array $assoc_args )
97100
{
98101
$all_sites_flag = Utils::get_flag_value( $assoc_args, 'all-sites' );
99102

@@ -115,8 +118,9 @@ public static function invoke_multisite( array $args, array $assoc_args ): void
115118
* Register the command with WP-CLI
116119
*
117120
* @param string $command CLI command handled by this class
121+
* @return void
118122
*/
119-
public static function init( string $command ): void
123+
public static function init( string $command )
120124
{
121125
if ( ! Utils::is_cli_running() ) {
122126
return;
@@ -129,8 +133,10 @@ public static function init( string $command ): void
129133

130134
/**
131135
* Register WP_CLI command using WP_CLI::add_command()
136+
*
137+
* @return void
132138
*/
133-
protected static function register( string $command ): void
139+
protected static function register( string $command )
134140
{
135141
// Register the command
136142
WP_CLI::add_command(
@@ -182,26 +188,31 @@ function( array $args, array $assoc_args, array $options ) use ( $command )
182188
* @param string[] $args
183189
* @param array<string,string> $assoc_args
184190
* @param array<string,mixed> $options
191+
* @return void
185192
*/
186-
public static function before_run_command( array $args, array $assoc_args, array $options ): void
193+
public static function before_run_command( array $args, array $assoc_args, array $options )
187194
{
188195
WP_CLI::debug("Skipping before_run_command hook", "idearia");
189196
}
190197

191198
/**
192199
* Override to inject code just before any command in the
193200
* class is invoked
201+
*
202+
* @return void
194203
*/
195-
public static function before_invoke(): void
204+
public static function before_invoke()
196205
{
197206
WP_CLI::debug("Skipping before_invoke hook", "idearia");
198207
}
199208

200209
/**
201210
* Override to inject code just after any command in the
202211
* class is invoked
212+
*
213+
* @return void
203214
*/
204-
public static function after_invoke(): void
215+
public static function after_invoke()
205216
{
206217
WP_CLI::debug("Skipping after_invoke hook", "idearia");
207218
}
@@ -236,8 +247,10 @@ public static function validate( array $args, array $assoc_args, array $options
236247
* Wrapper to avoid running before_invoke twice, due to how
237248
* WP-CLI works (it runs both for the parent comand and the
238249
* subcommand)
250+
*
251+
* @return void
239252
*/
240-
public static function _before_invoke(): void
253+
public static function _before_invoke()
241254
{
242255
if ( static::$count_before_invoke == 0 ) {
243256
static::before_invoke();
@@ -249,8 +262,10 @@ public static function _before_invoke(): void
249262
* Wrapper to avoid running after_invoke twice, due to how
250263
* WP-CLI works (it runs both for the parent comand and the
251264
* subcommand)
265+
*
266+
* @return void
252267
*/
253-
public static function _after_invoke(): void
268+
public static function _after_invoke()
254269
{
255270
if ( static::$count_after_invoke == 0 ) {
256271
static::after_invoke();

0 commit comments

Comments
 (0)