OSDN Git Service

everything is documentable, so get rid of the Documentable interface
authorscribu <mail@scribu.net>
Sun, 9 Jun 2013 19:23:00 +0000 (22:23 +0300)
committerscribu <mail@scribu.net>
Sun, 9 Jun 2013 19:24:27 +0000 (22:24 +0300)
php/WP_CLI/Dispatcher/CompositeCommand.php
php/WP_CLI/Dispatcher/RootCommand.php
php/WP_CLI/Dispatcher/Subcommand.php
php/commands/help.php
php/dispatcher.php

index 897992b..f39b9b8 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace WP_CLI\Dispatcher;
 
-class CompositeCommand extends AbstractCommandContainer implements Documentable {
+class CompositeCommand extends AbstractCommandContainer {
 
        protected $name;
        protected $shortdesc;
index 99f4c25..88da4a3 100644 (file)
@@ -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';
index c775ece..1e0fcd3 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace WP_CLI\Dispatcher;
 
-class Subcommand implements Command, Documentable {
+class Subcommand implements Command {
 
        private $parent, $name, $class, $method, $docparser;
 
index 12a3139..d23675d 100644 (file)
@@ -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 ) );
 
index b9921cb..25d7ee3 100644 (file)
@@ -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();
-}
-