Skip to content

Commit cdb0ac0

Browse files
authored
Merge branch 'master' into feature/cs-fixes-1
2 parents 4fbfcd0 + 5a58cc0 commit cdb0ac0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Scaffold_Command.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,10 @@ public function _s( $args, $assoc_args ) {
491491
*
492492
* @subcommand child-theme
493493
*/
494-
function child_theme( $args, $assoc_args ) {
494+
public function child_theme( $args, $assoc_args ) {
495495
$theme_slug = $args[0];
496496

497-
if ( in_array( $theme_slug, array( '.', '..' ) ) ) {
497+
if ( in_array( $theme_slug, array( '.', '..' ), true ) ) {
498498
WP_CLI::error( "Invalid theme slug specified. The slug cannot be '.' or '..'." );
499499
}
500500

@@ -636,12 +636,12 @@ private function get_output_path( $assoc_args, $subdir ) {
636636
* Success: Created plugin files.
637637
* Success: Created test files.
638638
*/
639-
function plugin( $args, $assoc_args ) {
639+
public function plugin( $args, $assoc_args ) {
640640
$plugin_slug = $args[0];
641641
$plugin_name = ucwords( str_replace( '-', ' ', $plugin_slug ) );
642642
$plugin_package = str_replace( ' ', '_', $plugin_name );
643643

644-
if ( in_array( $plugin_slug, array( '.', '..' ) ) ) {
644+
if ( in_array( $plugin_slug, array( '.', '..' ), true ) ) {
645645
WP_CLI::error( "Invalid plugin slug specified. The slug cannot be '.' or '..'." );
646646
}
647647

@@ -817,7 +817,7 @@ private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
817817

818818
if ( ! empty( $args[0] ) ) {
819819
$slug = $args[0];
820-
if ( in_array( $slug, array( '.', '..' ) ) ) {
820+
if ( in_array( $slug, array( '.', '..' ), true ) ) {
821821
WP_CLI::error( "Invalid {$type} slug specified. The slug cannot be '.' or '..'." );
822822
}
823823
if ( 'theme' === $type ) {
@@ -983,7 +983,7 @@ protected function prompt_if_files_will_be_overwritten( $filename, $force ) {
983983
$default = false,
984984
$marker = '[s/r]: '
985985
);
986-
} while ( ! in_array( $answer, array( 's', 'r' ) ) );
986+
} while ( ! in_array( $answer, array( 's', 'r' ), true ) );
987987
$should_write_file = 'r' === $answer;
988988
}
989989

0 commit comments

Comments
 (0)