Skip to content

Commit

Permalink
Merge pull request #102 from DrewAPicture/issue/doc-verbs
Browse files Browse the repository at this point in the history
Convert scaffold subcommand help summaries (and other method summaries) to use third-person singular verbs.
  • Loading branch information
schlessera authored Dec 9, 2017
2 parents 6cb2af4 + 5e7d22f commit 04be312
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions src/Scaffold_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use WP_CLI\Inflector;

/**
* Generate code for post types, taxonomies, plugins, child themes, etc.
* Generates code for post types, taxonomies, plugins, child themes, etc.
*
* ## EXAMPLES
*
Expand All @@ -27,7 +27,7 @@
class Scaffold_Command extends WP_CLI_Command {

/**
* Generate PHP code for registering a custom post type.
* Generates PHP code for registering a custom post type.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -84,7 +84,7 @@ public function post_type( $args, $assoc_args ) {
}

/**
* Generate PHP code for registering a custom taxonomy.
* Generates PHP code for registering a custom taxonomy.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -201,7 +201,7 @@ private function _scaffold( $slug, $assoc_args, $defaults, $subdir, $templates )
}

/**
* Generate starter PHP, JS and CSS code for registering a Gutenberg block.
* Generates PHP, JS and CSS code for registering a Gutenberg block.
*
* Blocks are the fundamental element of the Gutenberg editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.
* Visit https://wordpress.org/gutenberg/handbook/block-api/ to learn more about Block API.
Expand Down Expand Up @@ -299,7 +299,7 @@ public function block( $args, $assoc_args ) {
}

/**
* Generate starter code for a theme based on _s.
* Generates starter code for a theme based on _s.
*
* See the [Underscores website](https://underscores.me/) for more details.
*
Expand Down Expand Up @@ -420,7 +420,7 @@ public function _s( $args, $assoc_args ) {
}

/**
* Generate child theme based on an existing theme.
* Generates child theme based on an existing theme.
*
* Creates a child theme folder with `functions.php` and `style.css` files.
*
Expand Down Expand Up @@ -535,7 +535,7 @@ private function get_output_path( $assoc_args, $subdir ) {
}

/**
* Generate starter code for a plugin.
* Generates starter code for a plugin.
*
* The following files are always generated:
*
Expand Down Expand Up @@ -676,7 +676,7 @@ function plugin( $args, $assoc_args ) {
}

/**
* Generate files needed for running PHPUnit tests in a plugin.
* Generates files needed for running PHPUnit tests in a plugin.
*
* The following files are generated by default:
*
Expand Down Expand Up @@ -728,7 +728,7 @@ public function plugin_tests( $args, $assoc_args ) {
}

/**
* Generate files needed for running PHPUnit tests in a theme.
* Generates files needed for running PHPUnit tests in a theme.
*
* The following files are generated by default:
*
Expand Down Expand Up @@ -967,7 +967,7 @@ protected function log_whether_files_written( $files_written, $skip_message, $su
}

/**
* Extract dashicon name when provided or return null otherwise.
* Extracts dashicon name when provided or return null otherwise.
*
* @param array $assoc_args
* @return string|null
Expand Down Expand Up @@ -1001,7 +1001,7 @@ private function get_textdomain( $textdomain, $args ) {
}

/**
* Generate the machine name for function declarations.
* Generates the machine name for function declarations.
*
* @param string $slug Slug name to convert.
* @return string
Expand All @@ -1011,7 +1011,7 @@ private function generate_machine_name( $slug ) {
}

/**
* Pluralize noun
* Pluralizes a noun.
*
* @see Inflector::pluralize()
* @param string $word Word to be pluralized.
Expand All @@ -1036,7 +1036,7 @@ protected function quote_comma_list_elements( $comma_list ) {
}

/**
* Create the themes directory if it doesn't already exist
* Creates the themes directory if it doesn't already exist.
*/
protected function maybe_create_themes_dir() {

Expand All @@ -1048,7 +1048,7 @@ protected function maybe_create_themes_dir() {
}

/**
* Create the plugins directory if it doesn't already exist
* Creates the plugins directory if it doesn't already exist.
*/
protected function maybe_create_plugins_dir() {

Expand All @@ -1059,7 +1059,7 @@ protected function maybe_create_plugins_dir() {
}

/**
* Initialize WP Filesystem
* Initializes WP_Filesystem.
*/
protected function init_wp_filesystem() {
global $wp_filesystem;
Expand All @@ -1069,14 +1069,14 @@ protected function init_wp_filesystem() {
}

/**
* Localize path to template
* Localizes the template path.
*/
private static function mustache_render( $template, $data = array() ) {
return Utils\mustache_render( dirname( dirname( __FILE__ ) ) . '/templates/' . $template, $data );
}

/**
* Get template path based on installation type
* Gets the template path based on installation type.
*/
private static function get_template_path( $template ) {
$command_root = Utils\phar_safe_path( dirname( __DIR__ ) );
Expand Down Expand Up @@ -1122,8 +1122,7 @@ private static function canonicalize_path( $path ) {
}

/**
* Get an active theme's name when true provided
* or the same name otherwise.
* Gets an active theme's name when true provided or the same name otherwise.
*
* @param string|bool $theme Theme name or true.
* @return string
Expand Down

0 comments on commit 04be312

Please sign in to comment.