WP_CLI\Dispatcher

CommandFactory::is_good_methodprivate staticWP-CLI 1.0

Check whether a method is actually callable.

Method of the class: CommandFactory{}

No Hooks.

Returns

true|false.

Usage

$result = CommandFactory::is_good_method( $method );
$method(ReflectionMethod) (required)
.

CommandFactory::is_good_method() code WP-CLI 2.13.0-alpha

private static function is_good_method( $method ) {
	return $method->isPublic() && ! $method->isStatic() && 0 !== strpos( $method->getName(), '__' );
}