From: scribu Date: Sun, 9 Jun 2013 19:23:00 +0000 (+0300) Subject: everything is documentable, so get rid of the Documentable interface X-Git-Tag: v0.11.0~119^2~5 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cd092fd19732e640cd171f57406af3bf2870302d;p=wvm%2Fwvm.git everything is documentable, so get rid of the Documentable interface --- diff --git a/php/WP_CLI/Dispatcher/CompositeCommand.php b/php/WP_CLI/Dispatcher/CompositeCommand.php index 897992bb..f39b9b82 100644 --- a/php/WP_CLI/Dispatcher/CompositeCommand.php +++ b/php/WP_CLI/Dispatcher/CompositeCommand.php @@ -2,7 +2,7 @@ namespace WP_CLI\Dispatcher; -class CompositeCommand extends AbstractCommandContainer implements Documentable { +class CompositeCommand extends AbstractCommandContainer { protected $name; protected $shortdesc; diff --git a/php/WP_CLI/Dispatcher/RootCommand.php b/php/WP_CLI/Dispatcher/RootCommand.php index 99f4c253..88da4a36 100644 --- a/php/WP_CLI/Dispatcher/RootCommand.php +++ b/php/WP_CLI/Dispatcher/RootCommand.php @@ -4,7 +4,7 @@ namespace WP_CLI\Dispatcher; use \WP_CLI\Utils; -class RootCommand extends AbstractCommandContainer implements Documentable { +class RootCommand extends AbstractCommandContainer { function get_name() { return 'wp'; diff --git a/php/WP_CLI/Dispatcher/Subcommand.php b/php/WP_CLI/Dispatcher/Subcommand.php index c775ece8..1e0fcd34 100644 --- a/php/WP_CLI/Dispatcher/Subcommand.php +++ b/php/WP_CLI/Dispatcher/Subcommand.php @@ -2,7 +2,7 @@ namespace WP_CLI\Dispatcher; -class Subcommand implements Command, Documentable { +class Subcommand implements Command { private $parent, $name, $class, $method, $docparser; diff --git a/php/commands/help.php b/php/commands/help.php index 12a31397..d23675de 100644 --- a/php/commands/help.php +++ b/php/commands/help.php @@ -106,8 +106,7 @@ class Help_Command extends WP_CLI_Command { $fd = fopen( "php://temp", "rw" ); - if ( $command instanceof Dispatcher\Documentable ) - self::add_initial_markdown( $fd, $command ); + self::add_initial_markdown( $fd, $command ); fwrite( $fd, file_get_contents( $doc_path ) ); diff --git a/php/dispatcher.php b/php/dispatcher.php index b9921cb5..25d7ee32 100644 --- a/php/dispatcher.php +++ b/php/dispatcher.php @@ -17,7 +17,10 @@ interface Command { function get_name(); function get_parent(); + function get_synopsis(); + function get_shortdesc(); + function get_full_synopsis(); function get_subcommands(); @@ -34,10 +37,3 @@ interface CommandContainer { function pre_invoke( &$args ); } - -interface Documentable { - - function get_shortdesc(); - function get_full_synopsis(); -} -