diff --git a/src/Command/ScaffoldThemeCommand.php b/src/Command/ScaffoldThemeCommand.php index e876d0d..48955d3 100644 --- a/src/Command/ScaffoldThemeCommand.php +++ b/src/Command/ScaffoldThemeCommand.php @@ -86,7 +86,7 @@ protected function execute( InputInterface $input, OutputInterface $output ) { * @author Julien Maury * @source https://stackoverflow.com/a/7775949 */ - protected static function recursive_copy( $source, $destination ) { + protected function recursive_copy( $source, $destination ) { foreach ( $iterator = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator( $source, \RecursiveDirectoryIterator::SKIP_DOTS ), @@ -110,7 +110,7 @@ protected static function recursive_copy( $source, $destination ) { * * @return bool */ - protected static function doStrReplace( $path, $search, $replace = '', $extension = 'php' ) { + protected function doStrReplace( $path, $search, $replace = '', $extension = 'php' ) { if ( empty( $path ) || empty( $search ) ) { return false; @@ -126,6 +126,7 @@ protected static function doStrReplace( $path, $search, $replace = '', $extensio } } + return true; } /** @@ -223,7 +224,7 @@ protected function generateTheme( $composer, $io, $themeName, $themePath, $theme $composerFile->write( $composerJson ); $output->writeln( "The namespace have been added to the composer.json file !" ); - } catch ( RuntimeException $e ) { + } catch ( \RuntimeException $e ) { $output->writeln( "An error occurred" ); $output->writeln( sprintf( "%s", $e->getMessage() ) ); exit;