diff --git a/src/Scaffold_Command.php b/src/Scaffold_Command.php index 47e69f0e3..b415bb076 100644 --- a/src/Scaffold_Command.php +++ b/src/Scaffold_Command.php @@ -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 * @@ -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 * @@ -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 * @@ -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. @@ -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. * @@ -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. * @@ -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: * @@ -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: * @@ -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: * @@ -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 @@ -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 @@ -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. @@ -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() { @@ -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() { @@ -1059,7 +1059,7 @@ protected function maybe_create_plugins_dir() { } /** - * Initialize WP Filesystem + * Initializes WP_Filesystem. */ protected function init_wp_filesystem() { global $wp_filesystem; @@ -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__ ) ); @@ -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