OSDN Git Service

make parse_name a private function, since it's not used in CommandWithUpgrade
authorscribu <mail@scribu.net>
Mon, 8 Jul 2013 17:36:13 +0000 (20:36 +0300)
committerscribu <mail@scribu.net>
Mon, 8 Jul 2013 17:36:18 +0000 (20:36 +0300)
also, each implementation returns different things

php/WP_CLI/CommandWithUpgrade.php
php/commands/plugin.php
php/commands/theme.php

index 1b34348..7441330 100644 (file)
@@ -9,8 +9,6 @@ abstract class CommandWithUpgrade extends \WP_CLI_Command {
        protected $upgrade_refresh;
        protected $upgrade_transient;
 
-       abstract protected function parse_name( $args );
-
        abstract protected function get_item_list();
        abstract protected function get_all_items();
 
index 17989e7..e432b46 100644 (file)
@@ -330,7 +330,7 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
         * @param array $args
         * @return array
         */
-       protected function parse_name( $args ) {
+       private function parse_name( $args ) {
                $name = $args[0];
 
                $plugins = get_plugins( '/' . $name );
index b5639d2..cabca9d 100644 (file)
@@ -216,7 +216,7 @@ class Theme_Command extends \WP_CLI\CommandWithUpgrade {
                parent::_list( $_, $assoc_args );
        }
 
-       protected function parse_name( $args ) {
+       private function parse_name( $args ) {
                $name = $args[0];
 
                $theme = wp_get_theme( $name );